LinuxQuestions.org
Register a domain and help support LQ
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 12-29-2008, 09:07 PM   #1
pbharris
Member
 
Registered: Apr 2001
Location: chicago, IL
Distribution: debian, redhat
Posts: 280

Rep: Reputation: 30
linking in lib staticly to enable gdb


hello,
I am trying to staticly link in a lib so i can step into it using gdb, anyway using this gcc command works (non static)
Code:
gcc -ggdb -I/home/pbharris/progs/usb/libusb-0.1.12/ -I./ -lm -lc /home/pbharris/progs/usb/libusb-0.1.12/libs/libusb.so -o pwrdown pwr_down.c

adding a -static gets me this:

Quote:
/usr/bin/ld: attempted static link of dynamic object `/home/pbharris/progs/usb/libusb-0.1.12/libs/libusb.so'
i removed the option in libusb makefile to have it be dynamic...

any ideas?
Thanks
 
  


Reply


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
mplayer linking lib classic Linux - General 2 09-23-2006 10:44 AM
Staticly Assign IP carlosinfl Debian 7 04-08-2006 05:56 AM
Problem linking assembly program with C lib. 95se Programming 1 03-08-2005 10:44 PM
Linking whole archive into shared lib mj_ Programming 0 07-23-2004 07:00 AM
Staticly linked jre? lsakhvoruk Linux - Software 0 10-13-2003 04:34 PM


All times are GMT -5. The time now is 08:00 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration