Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-13-2012, 09:45 AM   #1
LQ Newbie
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
【how to link to static libs when calling cmake or autoconf】

suggest i have the source code of an application, which depends on packages A and B.
I want the program statically link to libA.a and dynamically link to
What extra parameter should I specify when calling cmake or ./configure?
Old 03-08-2012, 12:17 PM   #2
Registered: Sep 2011
Posts: 96

Rep: Reputation: 15

Just dumb idea, I think you need to use gcc -static to statically link to libA. How about libB? You need to directly use dlopen() for that. So it won't be linked at compile time but use at runtime.

Hope it helps...


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
【Tetris Game -- based on a shell script】(new algorithm) crulat Programming 37 04-17-2012 12:22 PM
Need surefire way to build 64-bit libs with cmake -> /usr/lib64 H_TeXMeX_H Linux - Software 1 03-21-2010 01:01 AM
Making a static lib from objects + static libs kovacsp Programming 2 12-19-2007 12:53 PM
link-time libs need to be run0time libs says curl's make install UniquelyAm Linux - Software 0 06-09-2007 01:40 AM
An question about tethereal.【relink】 operand Linux - Newbie 0 12-21-2005 07:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:35 PM.

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