LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-22-2009, 08:57 AM   #1
IanVaughan
Member
 
Registered: Jun 2009
Location: Brighton, UK
Posts: 49

Rep: Reputation: 16
linking to shared libraries then using - where to store?


I compile a load of shared libraries, and currently place them in my /libs/linux build path, as on windows the .libs go into /libs/win32.

But on linux these are the binary run times as well, whereas on windows, it creates .dll's for the run time, which of course go into /bin/win32.

a) Whats the best solution for my linux paths? Place them only into /bin and add that path to the linker options (seems odd!).
b) Duplicate/copy them in both the /libs and /bin (waste of disc!)
 
Old 09-22-2009, 10:15 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
"best" is subjective.

"usual" is to put the stuff you create in /usr/local. You can make a /usr/local/bin and a /usr/local/lib or make something like /usr/local/mystuff/bin and /usr/local/mystuff/lib. Many add on packages build a subdirectory under /usr/local then put their lib, bin, man etc... under that subdirectory.

You can add the executables directory to your PATH variable in /etc/bashrc (if using bash). You could also create links in /usr/lib to the stuff you build under /usr/local so it finds the libraries in default location but you'd have a link letting you know where the libraries really are.
 
  


Reply

Tags
dll, lib, link, object, shared


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking to Shared Libraries with g++ random0 Programming 1 06-15-2006 11:12 PM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 08:47 AM
Shared libraries and linking., devin Programming 3 04-08-2003 04:18 PM
Linking to shared libraries? Griffon26 Programming 1 10-20-2001 06:29 PM
linking with shared libraries kobilevi Programming 0 03-01-2001 11:09 AM


All times are GMT -5. The time now is 04:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration