LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 07:57 AM   #1
IanVaughan
Member
 
Registered: Jun 2009
Location: Brighton, UK
Posts: 50

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, 09:15 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
"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



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 10:12 PM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 07:47 AM
Shared libraries and linking., devin Programming 3 04-08-2003 03:18 PM
Linking to shared libraries? Griffon26 Programming 1 10-20-2001 05:29 PM
linking with shared libraries kobilevi Programming 0 03-01-2001 10:09 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:54 PM.

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
Open Source Consulting | Domain Registration