I was googling but I don't find a solution, I want to compile a C program with gcc in 32 bits on a x64 bits Debian system. I use the following command to compile:
gcc -m32 -o programExecutable -L/usr/lib/i386-linux-gnu/ -I/home/secnok/polarssl-
1.3.5/include/ -I/usr/local/include/libusb-1.0 main.c /home/secnok/polarssl-
1.3.5/library/libpolarssl.a /usr/local/lib/libusb-1.0.a -lpthread -ludev
and I obtain this output:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux gnu/4.7
/../../../libudev.so when searching for -ludev /usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../libudev.a when searching for -ludev
/usr/bin/ld: skipping incompatible /usr/lib/libudev.so when searching for -ludev
/usr/bin/ld: skipping incompatible /usr/lib/libudev.a when searching for -ludev
/usr/bin/ld: cannot find -ludev
I have installed the libraries gcc++cmultilib and ia32-libs. In the same way, I have exported the path:
export LD_LIBRARY_PATH="/lib32:/usr/lib32:$LD_LIBRARY_PATH"
and it still doesn't compile. This code compiles in x64 without errors, I just want to compile the same code for 32 bits.