RE: LDFLAGS -static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There could be at least a couple different problems.  First, are you
sure there's a static version of libnewt there?  If so, it may be that
the program you are compiling was not properly set up for static
linking.  Normally, if the developer is just thinking about dynamic
linking, they often don't worry about the order that libraries are
specified on the link command line, which is fine for dynamic linking.
However, when linking statically, order does matter, and each library
needs to appear on the command line after everything else that uses that
library (even other libraries), or the symbols defined in that library
will not get found properly.  It's possible that in your case, libnewt
is specified too early on the command line and simply needs to be moved
to the end.

Good luck,
Lyle

-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Mansour Al-Aqeel
Sent: Sunday, December 28, 2003 7:06 AM
To: gcc-help@xxxxxxxxxxx
Subject: LDFLAGS -static

Hi every body:
I'm having a problem configuring a program for a static compilation.
I'm using the command

LDFLAGS="--static -I/usr/lib" CC="diet gcc -nostdinc" ./configure \
--prefix=~/result --disable-shared --enable-all-static --disable-nls

how ever i keet on getting an error complainig about the need for
libnewt.
the library is there. I installed it from rpm packages with it's devel
package.

I've tried adding CPPFLAGS="-L/usr/include"

I've tried searching the archieve before asking.
any advice about how to solve this, or a place where I can get more
about
this situation ??
but no luck. I'm using redhat 7.3
By the way, I'm not an expert in compiling and linking .
Thanx alot. 
-- 
  Mansour Al-Aqeel
  mansour77@xxxxxxxxxxx

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux