LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2010, 08:17 AM   #1
listener
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Rep: Reputation: 0
Compiling a program on Suse


I'm trying to compile a little program of mine on Suse and I would prefer to compile statically. It says my library is a dynamic object? Is there a workaround to include it in my binary statically?


/usr/share/doc/vmware-vix/samples # gcc -I/usr/include/vmware-vix powerOn.c -o powerOn -static /usr/lib/libvixAllProducts.so
/usr/lib/gcc/i586-suse-linux/4.3/../../../../i586-suse-linux/bin/ld: attempted static link of dynamic object `/usr/lib/libvixAllProducts.so'
collect2: ld returned 1 exit status


thanks,
h.h.
 
Old 03-10-2010, 01:01 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
For static linking you should link against .a not .so libs.

Evo2.
 
  


Reply



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
Compiling C program Udhayakrishnan Programming 8 02-10-2010 08:21 AM
Suse 10.1 - Different Program Compiling issues crazibri SUSE / openSUSE 1 06-16-2006 11:59 PM
help compiling a program minm Linux - Newbie 3 10-10-2005 01:14 AM
Compiling a program lintho Linux - Software 2 08-24-2004 07:41 AM
Compiling Program Star3132 Linux - General 8 06-29-2004 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:02 AM.

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