RE: [Dev-C++] Linking with a static library produced in dev-c++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Matthews <dem...@uw...> - 2003-01-12 01:06:55
|
Also make sure you've dropped the .a file in your lib directory, or you've specified an alternative directory to look for libraries in. At 07:01 PM 11/01/2003 +0800, blakjak wrote: >Jordi, > >Did you link the library in correctly? To link in library libmath3d.a >you should use the option -lmath3d > >BlakJak :] > >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...]On Behalf Of Jordi >Rovira i Bonet >Sent: 11 January 2003 16:54 >To: dev...@li... >Subject: [Dev-C++] Linking with a static library produced in dev-c++ > > >Hello, > > I've build the library math3d (math3d.sf.net) succesfully in Dev-C++ >producing a nice libmath3d.a. Now whenever i try to link a simple >program that uses any class in this library i get an error like the one >below. I'm using the latest beta version of DevC++ i think. The problem >is so simple that i don't know how to approach it, and as i think it >might be a common problem i'm posting. > >g++.exe -c test/main.cpp -o test/main.o -I"D:/Programes/Dev-Cpp/include" > -I"D:/jordi/math3d-0.3.0" -I"D:/Programes/Dev-Cpp/include/c++" >-I"D:/Programes/Dev-Cpp/include/c++" >g++.exe test/main.o -o "Test.exe" -L"D:/Programes/Dev-Cpp/lib" math3d.a >-I"D:/Programes/Dev-Cpp/include" -I"D:/jordi/math3d-0.3.0" >-I"D:/Programes/Dev-Cpp/include/c++" >-I"D:/Programes/Dev-Cpp/include/c++" >test/main.o(.text+0xa2):main.cpp: undefined reference to >`_imp___ZN6Math3dlsERSoRKNS_3M3dE' >make.exe: *** [Test.exe] Error 1 >Execution terminated > > >I would appreciate any hints. > >(jordi) > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >http://www.vasoftware.com >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >http://www.vasoftware.com >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |