Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Linux external libs
Linux external libs [message #35985] Mon, 16 April 2012 00:27 Go to next message
jshanab is currently offline  jshanab
Messages: 3
Registered: April 2012
Junior Member
I got my first app working on Linux then added to it at work on windows and now I am having trouble getting the new version to work on linux. I added a library and I am getting a linker error or errors. How do you add an external library in Linux.

I added the include and lib path in setup/build Methods and have libzmq in the package organizer without the when field since it is used in both.

But linux does not need or have .lib files so how does this work in Linux?
Re: Linux external libs [message #35986 is a reply to message #35985] Mon, 16 April 2012 08:54 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Jeff,

Do I understand correctly that you're working with the ZMQ package from bazaar? (If not, maybe you should give it a try Wink )

Either way, there are .so and/or .a files instead of .lib. So you have to have file named libzmq.so (or libzmq.a if you prefer static linking). You don't say which distribution you use, so just as an example: For ubuntu you have to install package libzmq-dev which will place the libraries into the /usr/lib directory.

The rest of the steps should be the same as on windows, with the exception that you don't have to specify the lib path as the compiler will find it automatically if it is in /usr/lib.

Best regards,
Honza
Re: Linux external libs [message #35987 is a reply to message #35985] Mon, 16 April 2012 13:28 Go to previous messageGo to next message
jshanab is currently offline  jshanab
Messages: 3
Registered: April 2012
Junior Member
I have built zmq myself, there are to be many libs, this is more about the general "how do I add an external library in linux" than ZMQ itself.
I am running gentoo and the .so is in /usr/local/lib64
I added paths just like in windows, but it just doesn't work.
I tried a few combinations but no dice. Are there hardcoded paths inside the IDE?

I think I know the difference between .a,.lib.so,.dll and also made sure the shared library button is checked. But am not sure how upp handles them. For example I expect entries in Package->Organizer to be for static libs, not shared libs. I expect the entries in build system to point to the directories needed for include and libs.

Must be that it does not update LD_LIBRARY_PATH or add the -L ???



Re: Linux external libs [message #35988 is a reply to message #35985] Mon, 16 April 2012 13:37 Go to previous message
jshanab is currently offline  jshanab
Messages: 3
Registered: April 2012
Junior Member
OMG

Have to have entry
WIN32 libzmq
AND
LINUX zmq

and not

{BLANK} libzmq

I will see if windows version can be named zmq when I get to work.
Previous Topic: How to add accelerator keys to menus
Next Topic: UDP connection
Goto Forum:
  


Current Time: Sat Apr 27 14:30:28 CEST 2024

Total time taken to generate the page: 0.04430 seconds