Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Maynah on December 12, 2009, 09:59:27 pm
-
I'm using MinGW for a compiler and whenever i open a file to build it always builds a project that i had previously done, it does it to every code i try to build and i cant figure out how to get it to not show up on every project i do.
-
Build or Re-Build?
If just Re-Build does it; look for a project dependency setting.
If both the likely, you have a issue with you file time/system clock.
Tim S.
-
I'm using MinGW for a compiler and whenever i open a file to build it always builds a project that i had previously done, it does it to every code i try to build and i cant figure out how to get it to not show up on every project i do.
Can you please describe exactly what you do ?
Do you try to build a single file or a project ?
If it's asingle file, do you have a project opened or just the file ?
If it's a project, do you have one or multiple projects open at the same time ?
-
I'm opening a new project and then i open my file into CB and im building not re building. when i build it it says there are no errors but when i run it its running a different file (main.cpp) ive tried to go through and delete this but it still runs it.
-
the file that keeps building is under sources everytime i open a file
-
any clue how to get this to not show up?
-
No clue what is wrong.
Suggest turning on full compiler log
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Tim S.
-
Do I understand correctly, that you have a project open, that has main.cpp under sources in the manager pane ?
Then you open another source file and click on build or build and run ?
If you do so, that can not work, because the toolbar-buttons work woth the active project, not with single files that does not belong to a project.
In this case you can either close the project and open the file or (better and the only simple way to use the debugger in gdb) add the file to a(n empty) project, to be sure to build and run the correct sources.
Single files can only be build from the menu or with keyboard-shortcut (strg+shift+f9).
If a project (or most likely the default workspace) always opens on C::B startup, you can try to check "Settings -> Environment... -> General settings -> On application start-up -> Open blank workspace".
A look into the documentation might also be helpful: http://www.codeblocks.org/user-manual (http://www.codeblocks.org/user-manual).