[AGENT++] Static linking?
Gens
Michael.Gens at TU-Berlin.DE
Wed Sep 24 12:36:53 CEST 2014
Hello,
Is there a chance to link files of SNMP++ - library statically into my
projects?
I want to avoid installing SNMP++( - library files) on different x86_64
systems.
How does it work?
I already tried "-static" as linker option but I am running into errors:
Building target: <file>
Invoking: GCC C++ Linker
g++ -static -pthread -lsnmp++ -o "<file>" ./<file1>.o ./<file2>.o
./<file3>.o ./<file4>.o ./<file5>.o ./<file5>.o ./<file6>.o ./<file7>.o
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
cannot find -lm
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
cannot find -lpthread
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
cannot find -lc
Without -static all compiling and linking is error free.
Thank you very much in advance for your help.
--
Best Rgds.
Michael
More information about the AGENTPP
mailing list