From: Michael G. <mg...@te...> - 2005-08-10 07:52:46
|
Hi Sergey ! [cmdline snipped] > sim.o(.text+0x87):sim.cpp: undefined reference to `SIM::logEnabled()' > sim.o(.text+0xa9):sim.cpp: undefined reference to `SIM::log(unsigned=20 [more errors snipped] > >>All files and libraries exists. > >=20 > > Are you sure you have libraries './.libs/libsim.dll.a', > > '/mingw/lib/libxslt.dll.a' and '/mingw/lib/libxml2.dll.a' ? > >=20 > Yeah! > $ ls -l /mingw/lib/libxslt* > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 1733452 Aug 8 04:56 /= mingw/lib/libxslt.a > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 144588 Aug 8 04:56=20 > /mingw/lib/libxslt.dll.a > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 816 Aug 8 04:56=20 > /mingw/lib/libxslt.la >=20 > $ ls -l /mingw/lib/libxml2* > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 6644018 Aug 4 12:59 /= mingw/lib/libxml2.a > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 1017036 Aug 4 12:59=20 > /mingw/lib/libxml2.dll.a > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 781 Aug 4 12:59=20 > /mingw/lib/libxml2.la >=20 > $ ls -l ./.libs/libsim* > -rwxr-xr-x 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 2756281 Aug 9 09:46 .= /.libs/libsim-0.dll > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 1998 Aug 9 09:46 .= /.libs/libsim.dll.a > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 914 Aug 9 09:46 .= /.libs/libsim.la > -rw-r--r-- 1 serzh =E1=C4=CD=C9=CE=C9=D3=D4 922 Aug 9 09:46 .= /.libs/libsim.lai Ok, I think here we see the problem. Under **ix (and the MinGW toolchain adheres to that convention) libraries have the name lib<somename>.a When the linker (ld) sees something like '-l<somename>' it tries to link against lib<somename>.a MinGW adds the special feature to check for lib<somename>.dll before. Therefor for your above libs to link you have to add =2D '-lxslt' for libxslt.a =2D '-lxml2' for libxml2.a =2D either '-lsim-0' for libsim-0.dll or '-lsim.dll' for libsim.dll.a (not sure wether this last one would work). In particular you should change the name of the library libsim.dll.a to libsim.a (preferably when creating it). You probably should change the name of libsim-0.dll as well unless you know what you are doing. Note that by "change the name" I mean the process that creates the libs, not just a simple rename command (although that might work too). Last not least: If the libsim-0.dll had been created by MinGW you don't need a libsim.a as ld is perfectly able to link again libsim-0.dll when you provide the option '-lsim-0'. =46or more details I suggest you check out the mingwiki. There are quite a few pages that deal with problems similar to the one you are experiencing. HTH, best, Michael =2D-=20 Vote against SPAM - see http://www.politik-digital.de/spam/ Michael Gerdau email: mg...@te... GPG-keys available on request or at public keyserver |