On 12-08-07 05:20 PM, Phil Blundell wrote:
On Tue, 2012-08-07 at 15:29 -0400, Yao Zhao wrote:
On 12-08-07 02:45 PM, Phil Blundell wrote:
On Tue, 2012-08-07 at 14:43 -0400, Yao Zhao wrote:
On 12-08-07 02:38 PM, Phil Blundell wrote:
On Tue, 2012-08-07 at 14:35 -0400, Yao Zhao wrote:
On 12-08-07 02:30 PM, Phil Blundell wrote:
Where do libz.a and libz.so end up after your patch?
├── zlib-dev
│ ├── lib
│ │ └── libz.so -> libz.so.1.2.7
└── zlib-staticdev
└── lib
└── libz.a
I found the output from "tree" a bit hard to read, but that doesn't look
right to me.
any reason? It shouldn't go to lib, but still /usr/libxx?
Conventionally, yeah. I think the linker does search both but the
development files would traditionally go in /usr/lib.
If don't install libz.a to the same directory, will linker find libz.a
not libz.so if -L /usr/lib -L /lib?
You want both libz.a and libz.so in /usr/lib so I think that ought to be
a non-issue. But in any case, I think (though I'm not 100% certain)
that it will look for libz.so in all paths before searching for libz.a.
I want both libz.a and libz.so* in /lib.
I wrote a simple test case:
cat Makefile
all:
gcc -c -fPIC -DPIC -o test.o test.c -g
gcc -o libtest.so -shared test.o
gcc -c -o test_main.o test_main.c -g
ar rc libtest.a test.o
mv libtest.a usr/lib
mv libtest.so lib
gcc -o test_main_static test_main.o -L./usr/lib -L./lib -ltest
gcc -o test_main_shared test_main.o -L./lib -L./usr/lib -ltest
If don't install to same directory then it will have problems.
yao
p.
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core