LDFLAGS is just a feature of auto(conf|crap), and linker never looks at it. Just give all options on the command-line, like.
Up vote 0 down vote favorite share g+ share fb share tw.
How can I tell the linker that statically link libfoo. A while building the shared object sharedobj. So using gcc/make.
I have tried to pass the LDFLAG options LDFLAGS += -W1 --whole-archive -L/path/to/libfoo -lfoo I have also tried to pass LDFLAGS the options LDFLAGS += -W1, static -L/path/to/libfoo -lfoo I have also tried to pass LDFLAGS the options LDFLAGS += -W1, Bstatic -L/path/to/libfoo -lfoo and I have also tried to pass LDFLAGS the options LDFLAGS += -W1, statically_linked -L/path/to/libfoo -lfoo I have read through a number of links that tell me how to do it but none have worked so far. C++ makefile linker link|improve this question asked Jun 18 '10 at 12:37Swaroop S263 0% accept rate.
It may help to see the rule for building sharedobj. So and the output the rule produces when make is run – Loki Astari Jun 18 '10 at 12:44.
LDFLAGS is just a feature of auto(conf|crap), and linker never looks at it. Just give all options on the command-line, like: gcc obj1. O obj2.
O ... -shared -o libfoo. So -L/path/to/lib -lbar.
Then it should work when you add it as a dependency - like the other object (.o) files. Link a. O b.
O c. O staticlib. A into libsharedobj.so.
Yes. This is exactly what I want to do. – Swaroop S Jun 18 '10 at 12:51.
You might think of an library as an archive (.a) of object (.o) files. You can use it in a similar way to object files in your linker step. It's unclear to me however if all of the archive will be included in the shared object library (or exe) or only those parts required - my understanding was only what is required but I haven't played with *nix for a bit.
For a . So that might mean it won't include and export anything that isn't used by the . So itself.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.