|
From: | Nikos Chantziaras |
Subject: | Re: static linking if needed |
Date: | Fri, 05 Oct 2012 16:22:55 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120913 Thunderbird/15.0.1 |
On 09/06/12 20:29, Philipp Kraus wrote:
[...] I have try to use the --static and --as-needed option in a little example: g++ --static --as-needed -O2 -pipe -Wall -o programm programm.o and get the error ld: library not found for -lcrt0.o
I assume you only have this problem on OS X? Try adding this option to your compile and link flags:
-mmacosx-version-min=10.5Substitute "10.5" with whatever minimum OS X version your program depends on. Note: add it to both the compile *and* link flags.
[Prev in Thread] | Current Thread | [Next in Thread] |