linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Building a program "static"
@ 2002-10-29  9:00 Wrazlov
  2002-10-29 10:06 ` Glynn Clements
  0 siblings, 1 reply; 2+ messages in thread
From: Wrazlov @ 2002-10-29  9:00 UTC (permalink / raw)
  To: linux-c-programming

Hello,
I tried to build a program to be static, but it always says that some library 
was not found, altough it works very well if it's built normal (shared):
gcc -L/usr/qt-3.0.4/lib -lqt-mt -static program.static program.o
ld says: "-lqt-mt not found"
What's wrong with the linker-options?
 Thanks for helping...



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Building a program "static"
  2002-10-29  9:00 Building a program "static" Wrazlov
@ 2002-10-29 10:06 ` Glynn Clements
  0 siblings, 0 replies; 2+ messages in thread
From: Glynn Clements @ 2002-10-29 10:06 UTC (permalink / raw)
  To: wrazlov; +Cc: linux-c-programming


Wrazlov wrote:

> I tried to build a program to be static, but it always says that some library 
> was not found, altough it works very well if it's built normal (shared):
> gcc -L/usr/qt-3.0.4/lib -lqt-mt -static program.static program.o
> ld says: "-lqt-mt not found"
> What's wrong with the linker-options?

If you use "-static", you must have static (".a") versions of every
library which the program uses. In the above case, it's complaining
that it couldn't find "libqt-mt.a".

Binary packages often don't include static libraries; in which case,
you will have to build a static version of the library from source.

-- 
Glynn Clements <glynn.clements@virgin.net>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-29 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-29  9:00 Building a program "static" Wrazlov
2002-10-29 10:06 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).