Hi,
I am creating a shared library:
g++ -shared -Wl,-soname,libmylib.so.1 -o libmylib.so.1.0.1 myobject.o ${LibFlags}
where myobject.o is created from:
g++ -c -fPIC -Wall ${CFLAGS} ${INCLUDES} myobject.cpp
when I run 'nm | grep CAN' on myobject.o, it returns nothing.
I have a statically linked application binary that links against multiple user libraries and the pthread library. The application only uses a limited set of functions from each of these libraries.
I'm currently linking with two third party shared libraries (A.so and B.so) on linux. the problem is that both of the two so's linked statically with another library, as a result there are about 400 functions from A.so and B.so having the same names.
Hi,
I have tried for weeks. I am creating a shared library from two object files a.o and b.o.
Both a and b are classes that depend on a third-party library and class b wraps class a.
and therefore, both a.o and b.o have the same globals defined from the third-party api.
So I create a.o with
Possible Duplicate:
Can I mix static and shared-object libraries when linking?
I want to compile my app, linking statically only boost_system library. Other(glibc and etc) should be linked dynamically. How can i do it?
My command to compile dynamically:
g++ -o newserver server.cpp ...
I am generating a shared library on linux and I am using this xml parser "mini xml" to parse some xml config files for my library.
I am building a Shared Library (.so) on Linux and I am compiling and linking in an object that is not dynamically linking in certain functions. These functions are "extern 'C'" functions. They are appearing in the normal symbol table of the shared object but not the external functions list or the dynamic functions list. I am compiling and linking using g++.
I have a binary here that is apparently statically linked:
$ file wkhtmltopdf-amd64
wkhtmltopdf-amd64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped
$ ldd wkhtmltopdf-amd64
not a dynamic executable
$ readelf -d wkhtmltopdf-amd64
There is no dynamic section in this file.
But when i try to execute it, it complains that shared libs would be missing:
$ ./
Consider the following command:
g++ -Wl,--start-group main.o liba.a -Wl,--end-group -o a.out
Is it possible that in a.out there are some symbols defined in liba.a but not used by main.o? If yes, in what cases? Are there some tricks in writing the source code or invoking the compiler or linker to make this possible?