User forums > Using Code::Blocks
#include "glee.h" error: you need ISO C conforming compiler to use glibc headers
bootstrap:
Okay, I have reviewed the project settings and switches and such, and the only difference I can find between the invocation in eclipse and CodeBlocks is the following. In eclipse, it compiles with the gcc compiler, but the actual invocation is "g++" instead of "gcc". My understanding is "gcc" invokes "g++" anyway, but in CodeBlocks, I see no way to *force* the invocation of g++. Instead, CodeBlocks gives me a pulldown list of compilers to choose from, gcc being one of the choices. But I see nowhere to force CodeBlocks to invoke g++ versus gcc (or otherwise make the whatever distinctions the g++ invocation might have.
While my common sense says, "it can't be this", I cannot find other differences. One reason this seems like it is not the answer is what causes the problem, namely the "glee.h/glee.c" files... which are C, not C++. In contrast, all my files are ".h/.cpp" files (without classes or templates or function overloading, however), which compile okay. So, on the surface anyway, it seems that a C program is causing the problem, not C++. But what do I know? Obviously, not enough.
bootstrap:
Okay, finally I got it to compile (and run) successfully, not that I understand why. First of all, I'm sure I "tried this before" and it didn't solve the problem before. And second, now the situation is, I need a compiler flag on eclipse that breaks the compile on CodeBlocks! Specifically, I need the -traditional-cpp on eclipse to compile successfully (or at least I used to, didn't actually reconfirm this just now), yet the -traditional-cpp flag on CodeBlocks causes the problem I described. Play twilight-zone music here, briefly. Perhaps the g++ invocation that I described in my previous message does relate to the significance of this compiler switch in some way. Got me batman! I want to report this finding for anyone who finds this message in the future someday (who has the same problem). Thanks to everyone who replied to my post and gave suggestions.
Navigation
[0] Message Index
[*] Previous page
Go to full version