LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-27-2009, 07:46 AM   #1
lavixu
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
static linking in gcc


Hi,
I want to link a .elf file statically in GCC. what are the options available?
 
Old 11-27-2009, 08:07 AM   #2
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
Quote:
Originally Posted by lavixu View Post
Hi,
I want to link a .elf file statically in GCC. what are the options available?
gcc -static

will do the trick
 
  


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
gcc errors on static, but NOT dynamic, linking MALDATA Programming 5 10-03-2008 12:20 AM
linking static libraries??? birjodh Linux - Newbie 3 06-13-2007 03:54 AM
static linking in debian? clydemaxwell Debian 0 01-10-2007 01:28 PM
static linking to c library lantern Programming 1 04-19-2004 09:58 AM
Finding and Linking Static Libraries with gcc neorich Programming 15 08-10-2003 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 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