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
SuSE 9.0 + gcc with Irrlicht
-
- Posts: 11
- Joined: Sat Nov 22, 2003 11:03 pm
Ä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
../../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
-
- Posts: 11
- Joined: Sat Nov 22, 2003 11:03 pm
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
"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
-
- Posts: 11
- Joined: Sat Nov 22, 2003 11:03 pm
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
http://gcc.gnu.org/ml/gcc-help/2002-07/msg00186.html