Linking a static library to my code base - Please help [message #172916] |
Fri, 14 July 2006 06:19  |
Eclipse User |
|
|
|
Originally posted by: mailsiraj.gmail.com
Note: I have gone through almost all the article on CDT and spent a lot of
time at CDT forum, trying out the many suggestions to solve the static
library linking problem.
I have a C++ project set up in Visual studio, which is working fine. Being
a fan of Eclipse, I have tried to port it to Eclipse CDT (a Managed Make
C++ tutorial), but despite my repeated attempts, I am not able to do it,
since I am getting some linking errors in the eclipse CDT environment.
I have a third-party library called SNOCAPI.LIB which exposes an API,
which is used in my code. But even after I included this library under the
linker settings, I am still getting errors. (To include the library, I
tried to specify the string "SNOCAPI" on the Linker library settings and
added the path to Library search path). Still the errors didn't stop.
Somebody in the forum suggested that I add the full path (which looks
something like "C:\learn\SNOCAPI.LIB") to Miscellaneous -> Linker flags.
Even then, the error is still persistent.
Here is a sample of the error...
undefined reference to `__imp___ZN6snocap6SnoMan11getInstanceEv'
Any help in this regard is highly appreciated. I have been trying to get
it working for a painfully long amount of time...
|
|
|
Re: Linking a static library to my code base - Please help [message #172924 is a reply to message #172916] |
Fri, 14 July 2006 08:34   |
Eclipse User |
|
|
|
Originally posted by: ed_06.tantec.de
> I have a third-party library called SNOCAPI.LIB which exposes an API,
> which is used in my code.
I'm not sure about the details, because it should be possible to use
Eclipse even with the VC-Compiler, which should know *.lib-files, but
working with MinGW, there are "Unix-style-Libraries" needed, like
"libSNOCAPI.a". So if your SNOCAPI is a static library, I think you need
the source to recompile it for getting a "libSNOCAPI.a". If it is an
import library for a dll it is another option of making the lib - I had
this problem recently and found a morons guide for guys like me. ;o)
http://www.emmestech.com/software/cygwin/pexports-0.43/moron 1.html
It made my day. :o)
If there is no source for your static library, maybe it is possible to
use VC for wrapping it into a dll, you can import in morons way. But
this is just an idea, not a thing, I tested myself - so you would need
good luck.
|
|
|
|
|
|
|
Re: Linking a static library to my code base - Please help [message #173132 is a reply to message #173068] |
Tue, 18 July 2006 00:24  |
Eclipse User |
|
|
|
Originally posted by: mailsiraj.gmail.com
Hi Egberts,
> dependency walker (http://www.dependencywalker.com/)? This tools shows
> all the function names of the dll and maybe helps to get a better def file.
> I'm out of ideas and regarding to dll und import library now you know as
> much as I do. The only difference - for me it worked. ;o)
I tried Dependency Walker as well. But no way out of this plight. Thanks
for all the help that you have extended. Thanks again Ed...
|
|
|
Powered by
FUDForum. Page generated in 0.05224 seconds