Skip to main content



      Home
Home » Newcomers » Newcomers » How to add a library to Eclipse?
How to add a library to Eclipse? [message #271080] Tue, 26 May 2009 03:28 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
>
Re: How to add a library to Eclipse? [message #271126 is a reply to message #271086] Tue, 26 May 2009 21:47 Go to previous message
Eclipse UserFriend
Thank you, Ian.

Taking your advice I switched to the CDT newsgroup and I got the answer to
my problem immediately because it was asked and answered once there.

Best regards,

Itachi
Previous Topic:Ganymede Ant error "Build failed. Reason: Unable to find an Ant file to run."
Next Topic:eclipse ganymede have problem with large file
Goto Forum:
  


Current Time: Fri Sep 12 15:26:58 EDT 2025

Powered by FUDForum. Page generated in 0.09652 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top