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.5

Substitute "10.5" with whatever minimum OS X version your program depends on. Note: add it to both the compile *and* link flags.


_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to