Re: building 32-bit app on 64-bit system
- From: Andrey Rusanov <rusanov.as@xxxxxxxxx>
- Date: Wed, 9 Jun 2010 08:19:22 -0700 (PDT)
On 9 июн, 19:07, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:
Andrey Rusanov <rusanov...@xxxxxxxxx> writes:
[...]
3. add path to 32bit libgcc
build command:
g++ -m32 -L/opt/lib32/usr/lib -L/opt/lib32/usr/lib/gcc/i686-pc-linux-
gnu/4.4.3 emtyapp.cpp
output:
/usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /
lib/libc.so.6
/usr/bin/ld: cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
4. add path to 32bit libc.so.6
build command:
g++ -m32 -L/opt/lib32/usr/lib -L/opt/lib32/usr/lib/gcc/i686-pc-linux-
gnu/4.4.3 -L/opt/lib32/lib emtyapp.cpp
output:
/usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /
lib/libc.so.6
/usr/bin/ld: cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
So problem is that linker is looking for "/lib/libc.so.6" instead of
"lc".
-lc is a request to the linker to link with the first file named
libc.so* or libc.a* found in the current library search
path. Consequently, the output quoted above tells you that no
compatible C-library was found in the place where you believed one to
be (/opt/lib32/lib)
ok, in this case linker must look for "libc.so.6". but not for "/lib/
libc.so.6".
/lib/libc.so.6 - is default location of libc.so.6.
i tried to use -L/opt/lib32 hoping linker will concatenate it with /
lib/libc.so.6, but no success.
.
- Follow-Ups:
- Re: building 32-bit app on 64-bit system
- From: Rainer Weikusat
- Re: building 32-bit app on 64-bit system
- References:
- building 32-bit app on 64-bit system
- From: Andrey Rusanov
- Re: building 32-bit app on 64-bit system
- From: John Reiser
- Re: building 32-bit app on 64-bit system
- From: Andrey Rusanov
- Re: building 32-bit app on 64-bit system
- From: Rainer Weikusat
- building 32-bit app on 64-bit system
- Prev by Date: Re: building 32-bit app on 64-bit system
- Next by Date: Re: building 32-bit app on 64-bit system
- Previous by thread: Re: building 32-bit app on 64-bit system
- Next by thread: Re: building 32-bit app on 64-bit system
- Index(es):
Relevant Pages
|