User forums > Help

bugs and a compiler problem

<< < (2/3) > >>

Eric Burnett:
Thanks for the prompt reply! You have cleared almost everything up, I'm just confused on one issue. When are the compiler options that are setup in the plugin ever used? Because when I make a new, empty, project (so not from a template) right from the start it uses something else for the compiler options. I am not actually trying to switch on the fly, it just works out this way ;).

My Global compiler options:


And my Project's Compiler Options:


The default tab:


Oh, and the last item in the Code::Blocks log (if I am looking at the right thing) says "MacrosManager initialized". Nothing about compiling.

Thanks for the great work!

Anonymous:
Just found out what you meant about the debug log. For some reason, the last line is

[18:23:53.828]: Execution of 'mingw32-g++.exe   -Os -O    -I"C:\\Dev-Cpp\\include" -I"C:\\Dev-Cpp\\include\\c++" -I"C:\\Dev-Cpp\\include\\c++\\3.4.2" -I"C:\\DX9SDK\\Include" -I"C:\\DX9SDK\\Samples\\C++\\Common" -I"C:\\Dev-Cpp\\include\\c++\\3.4.2\\mingw32"  -c "test.cpp" -o ".objs\\test.obj"' in 'C:\Documents and Settings\Eric Burnett\Desktop' failed.

even though on the compiler tab it says

Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Documents and Settings\Eric Burnett\Desktop\

This is all related to it defaulting the compiler oddly, I'm just not sure why it is doing this.

mandrav:
The problem comes from the "default" target's selected compiler (based on your screenshots). You have GCC selected there.

When you hit compile, you are not compiling your project(!), but instead you 're compiling the project's targets. By default, the virtual target "all" is selected which causes all project's targets to be built (except those not belonging to the "all" target). In other words, a project is a collection of build targets.
When you switch compiler in the project's build options (and the project is selected in the tree - your 2nd screenshot), codeblocks should ask you if you want to change the compiler for all the targets accordingly. If it didn't, we may have a bug there.

Anyway, just change the compiler for the "default" target and you 're all set.

Yiannis.

Anonymous:
Yeah, I caught that, the real problem in my eyes is twofold. 1) By default, it is generating two different compilers for a blank project (I didn't change anything, just opened for a look and took screenshots), because it looks like 'Untitled1' is getting it from the plugin options, but 'default' is always starting with GCC. And 2), the global compiler options don't seem to appear on the project compiler options page. I'm not sure if it is compiling with those options anyways (I doubt it), or if they are just not being grabbed.

Either way, were pretty good here. Thanks for the prompt answers.

mandrav:

--- Quote ---By default, it is generating two different compilers for a blank project
--- End quote ---

This was fixed today in CVS :)


--- Quote ---the global compiler options don't seem to appear on the project compiler options
--- End quote ---

They 're not supposed to. Global compiler options are always in effect. That's why they 're called "global" ;)

Thank you for your comments,
Yiannis.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version