howto compile bin with my library using all-static and shared linked standart library
hi.
i start coding for linux about month ago. and i have one problem: i create project with main binnary and several libraries. i use -all-static to link binnary with libraries to one big binnary. but i have to add some external libraries (GL,GLU,X11) to work with x11 and opengl. kdevelop don't want to compile my project any more (there was many 'unresolved external') Ok then i turn -all-static off - and project was successfully compiled but all my libraries become dynamic too and i dont want it. Any suggestions how to build-in my libraries and use dynamic standart libraries |
Try linking explicitly to the static libs...
eg. gcc foo.c /usr/lib/libbar.a -lshared_lib |
re
i cannot use libbar.a becouse i need libbar.so and libbarbar.so
and libbar.so use libbarbar.so , also libbarbar.so use libbar.so so they must be dynamicly linked .so, but not .a |
you sound like you wanted everything dynamically linked. so what's wrong with using just -lbar -lbarbar?
|
re
i want what my project will be consist of several modules (they lies in different folders) while i develop it (it make easyer to work in team) but also i want to have one single binnary
i tried to use simple library (.a) but i have one sevetral libraries with cross-referencies so i decided to use .so with -all-static key i am new to kdevelop and maybe there is another way to do it. Do you know how to separete code in different dirrectory in kdevelop? i saw only one - in automake manager create subprojects and library targets in them ??? |
All times are GMT -5. The time now is 06:35 AM. |