User forums > Using Code::Blocks

Opening a CB project made from CMake

(1/2) > >>

SuperBoi45:
I got CMake to generate Codeblock Makefiles. With the IDE, I opened up the project CMake provided. Now how do I start making my own program with it? I created a main.cpp file and added it to the project. I put in inside src\SFML\Main\ (which is part of the directory structure CMake provided).

The problem I am facing is that when I press F9 (to build and run) the project simply builds but it never runs (or at least I can't tell that it does so). The console window doesn't appear even when I go into Project->Properties... and select "Console Project" as the type. And even when I select the checkbox to pause the screen it still doesn't work.

This is the first time I'm using SFML to build my project. All I want to do now is create a program now that I can compile, but it's not compiling anything at all. In fact, it's not even looking at my main.cpp file at all (I can put nonsense inside the file, no errors).

Maybe I put main.cpp in the wrong place?

stahta01:
Did you edit the makefile?
Note: I am guessing that CMake made a CB "custom makefile" project instead of a standard CB Project.

I am also guessing the makefile needs edited.

Tim S.

SuperBoi45:

--- Quote from: stahta01 on September 15, 2014, 11:01:31 pm ---Did you edit the makefile?
Note: I am guessing that CMake made a CB "custom makefile" project instead of a standard CB Project.

I am also guessing the makefile needs edited.

Tim S.

--- End quote ---

I didn't touch the Makefile and yes I told CMake to generate Codeblocks MakeFiles and make a project from that. And how can the Makefile be edited?

stahta01:

--- Quote from: SuperBoi45 on September 15, 2014, 11:06:21 pm ---And how can the Makefile be edited?

--- End quote ---

You can use any good text editor to edit a Makefile.
Code::Blocks should be able to edit a makefile; I have never used CB to edit a makefile, myself.

FYI: What to edit in a makefile is likely off topic for this website.

I suggest using standard CB project inside CB.

If you wish to use CMake generated CB custom makefiles you are NOT going to get much help on this site figuring out how to edit the makefile.

Note, to run the exe once you get it made; you might wish to try using the CB Tools or Toolplus Plugin.

If there a reason you are NOT using a standard CB project?

Tim S.

SuperBoi45:

--- Quote from: stahta01 on September 16, 2014, 12:37:16 am ---
--- Quote from: SuperBoi45 on September 15, 2014, 11:06:21 pm ---And how can the Makefile be edited?

--- End quote ---

You can use any good text editor to edit a Makefile.
Code::Blocks should be able to edit a makefile; I have never used CB to edit a makefile, myself.

FYI: What to edit in a makefile is likely off topic for this website.

I suggest using standard CB project inside CB.

If you wish to use CMake generated CB custom makefiles you are NOT going to get much help on this site figuring out how to edit the makefile.

Note, to run the exe once you get it made; you might wish to try using the CB Tools or Toolplus Plugin.

If there a reason you are NOT using a standard CB project?

Tim S.



--- End quote ---

I'm new to this so I'm just trying to use CMake for SFML development. I'm following a tutorial that tells us how to set up CMake with SFML and it told us to chose the makefile generator that was for your IDE. My IDE is Codeblocks I simply chose CodeBlocks Makefiles from the list.

Navigation

[0] Message Index

[#] Next page

Go to full version