Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 12-29-2008, 09:07 PM   #1
Registered: Apr 2001
Location: chicago, IL
Distribution: debian, redhat
Posts: 280

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

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)
gcc -ggdb -I/home/pbharris/progs/usb/libusb-0.1.12/ -I./ -lm -lc /home/pbharris/progs/usb/libusb-0.1.12/libs/ -o pwrdown pwr_down.c

adding a -static gets me this:

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

any ideas?


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:19 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