News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

C++ error Codeblocks

Started by rajatkhanduja, June 13, 2010, 11:31:48 AM

Previous topic - Next topic

rajatkhanduja

I've been using C:B for C files/projects ... but only recently i began using it for C++ as well

Even the simplest of programs can't be compiled..although using terminal commands, I can compile the program..

despite checking that g++ is used (at least according to the settings), i still get the following in Build code....notice the "gcc"

Quote

-------------- Build: Debug in C++ ---------------

gcc  -o bin/Debug/C++ obj/Debug/try.o   -pg 
obj/Debug/try.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/4.4/iostream:72: undefined reference to `std::ios_base::Init::Init()'
/usr/include/c++/4.4/iostream:72: undefined reference to `std::ios_base::Init::~Init()'
obj/Debug/try.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Process terminated with status 1 (0
minutes, 0 seconds)
3 errors, 0 warnings
[/tt]

Please help

oBFusCATed

In the project tree right click the *.cpp files -> properties -> advanced -> compiler variable should be CPP (it is CC I suppose)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Jenna

What is the file-ending ?
If it is not cpp or cxx, but c, codeblocks assumes that it is a c-file and uses gcc instead of g++.