How to add a library to Eclipse? [message #271080] |
Tue, 26 May 2009 03:28  |
Eclipse User |
|
|
|
Hi everyone, my OS is Ubuntu 8.04 and my Eclipse version is 3.4.2
I have a project implemented in C, and to build it I need to add a
library, and its absolute path is /usr/lib/libodbc.so.1.0.0.
Although I successfully built the project using gcc command line, I could
not build it using Eclipse. To be more specific, I don't know how to add
the library libodbc.so.1.0.0 to Eclipse (Yes, the name of the library is
quite strange)
So could you please tell me how to add this library to the build path of
Eclipse?
Thanks in advance!
Best regards,
Sasuke
|
|
|
Re: How to add a library to Eclipse? [message #271086 is a reply to message #271080] |
Tue, 26 May 2009 12:25   |
Eclipse User |
|
|
|
Sasuke,
Are you trying to add the library to an application you are writing in
C, or in Java? If you are trying to add the library to a Java
application (the library may have a JNI interface to allow you to call
the functions from Java), then you can specify this in your launch
configuration in the VM Argument section by specifying
-Dlibrary.java=/usr/lib/libodbc.so.1.0.0
If you are writing a C/C++ application, and hoping to link to this
library, you should probably check on the CDT newsgroup.
cheers,
ian
sasuke wrote:
> Hi everyone, my OS is Ubuntu 8.04 and my Eclipse version is 3.4.2
>
> I have a project implemented in C, and to build it I need to add a
> library, and its absolute path is /usr/lib/libodbc.so.1.0.0.
> Although I successfully built the project using gcc command line, I
> could not build it using Eclipse. To be more specific, I don't know how
> to add the library libodbc.so.1.0.0 to Eclipse (Yes, the name of the
> library is quite strange)
>
> So could you please tell me how to add this library to the build path of
> Eclipse?
> Thanks in advance!
>
> Best regards,
>
> Sasuke
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.09652 seconds