SuSE 9.0 + gcc with Irrlicht

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

SuSE 9.0 + gcc with Irrlicht

Post by Guest »

Hello

I tried to link the HelloWorld Example unter SuSE 9.0 with the gcc 3, but while linkin with ld there are about 1000 "undefined reference to" errors.
have I forgot a few parameters?

gcc main2.cpp -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg

Thanks,
Johannes
zoschfrosch
Posts: 11
Joined: Sat Nov 22, 2003 11:03 pm

Post by zoschfrosch »

Would be interesting to see some concrete error messages. I had a problem with "undefined reference to" under Debian Linux. The solution was to add "-lpthread" in the "gcc..." line of the makefiles.
nebulon
Posts: 3
Joined: Mon Nov 24, 2003 9:46 am

Post by nebulon »

Ähm.....the first error message is:

../../lib/Linux/libIrrlicht.a(CBspTreeSceneNode.o)(.text+0x15d): In function `irr::scene::CBspTreeSceneNode::~CBspTreeSceneNode [not-in-charge]()':
: undefined reference to `operator delete(void*)'

and the last

../../lib/Linux/libIrrlicht.a(CBspTree.o)(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status


the errors between, about 50 or more, are referenced to the libIrrlicht.a

The path to the lib is right....hm...

Thanks a lot
Johannes
zoschfrosch
Posts: 11
Joined: Sat Nov 22, 2003 11:03 pm

Post by zoschfrosch »

Let's take the last message. The "__gxx_personality_v0" symbol ist part of the libstdc++.so (see http://gcc.gnu.org/ml/gcc-help/2002-07/msg00186.html). Seems that your Compiler does not find this library in the LIBPATH. Try
"gcc -print-file-name=libstdc++.so"
on the command line to find out if the compiler knows the library. My compiler answers with "/usr/lib/gcc-lib/i386-linux/3.3/libstdc++.so". You also can search the library on your disk and ask the compiler with
"gcc -print-search-dirs" where it looks for the libraries.
Hope this helps you solve the problem.
A good way solving such problems is pasting the error message in a search engine (I use metager.de). In most cases, you find hits with the solution.

Regards
Thomas
zoschfrosch
Posts: 11
Joined: Sat Nov 22, 2003 11:03 pm

Post by zoschfrosch »

The link in my last posting doesn't work. Here ist the correct one:
http://gcc.gnu.org/ml/gcc-help/2002-07/msg00186.html
nebulon
Posts: 3
Joined: Mon Nov 24, 2003 9:46 am

Post by nebulon »

Hm...
Thanks, but I can't solve the Problem.
gcc found the lib, but i browsed to it and found 5 lib with same name only the ending is a bit different.
nebulon
Posts: 3
Joined: Mon Nov 24, 2003 9:46 am

Post by nebulon »

Hi

Now I solved the Problem:
I have only must add " -lstdc++ " ;)

Thanks for help ;)
Johannes
Post Reply