[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compiling 32 bit on amd64 using ia32-libs(novice)

On 04-Sep-02 21:58, Ved wrote:
> Hi all,
> I have a pure64 installation with ia32-libs. I tried compiling a simple 
> "Hello world" program in 32-bit mode and it is unable to locate the 
> relavent 32bit i386 libraries.
> command:linux32 gcc -m32 -march=i386 hello.c
> output:
> /usr/bin/ld: skipping incompatible 
> /usr/lib/gcc-lib/x86_64-linux/3.3.4/./libgcc.a when searching for -lgcc
> /usr/bin/ld: skipping incompatible 
> /usr/lib/gcc-lib/x86_64-linux/3.3.4/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc
> collect2: ld returned 1 exit status
> I am able to run 32 bit apps, But unable to compile them. Is there 
> something I am missing? Is the ia32-libs pkg only for running programs 
> and not for development?

Please try

# apt-get install gcc-3.4 lib32gcc1 ia32-libs-dev
# gcc-3.4 -m32 hello.c
# ./a.out
hello world!

Andreas Jochens

Reply to: