Well, because nobody else has responded...
Quote:
gcc `pkg-config --cflags --libs gtk+-2.0` main.cpp -o hello -lglut -lGL -lGLEW
|
Quote:
Code:
main.cpp:(.text+0xcef): undefined reference to `operator new[](unsigned int)'
|
I don't use
gcc to compile C++ code. When I say "gcc" I mean the specific executable--not the compiler collection.
I always use
g++ to compile C++ code. The g++ executable should come with your gcc install. And, given that the linker is complaining about the "new" operator (a fundamental C++ operator), it seems like there's a basic/fundamental issue (e.g. using an incorrect compiler).
Try with g++ and see where it gets you.
There may be some relationship between gcc and g++ (apart from being in the same compiler collection). For instance, g++ may simply be gcc with a specific set of command line options automatically applied. Though, I'm not familiar enough with them to say there is or is not such a relationship.