PDA

View Full Version : Compile a 32bit dll on a 64bit machine


More
02-06-2007, 13:10
Hello,

I was running a 32bit vServer in the past but now rented a 64bit rootserver for me and my friends.
In the past on the 32bit machine the modules compiled fine, but now on the 64bit system I always get the error:
"error: CPU you selected does not support x86-64 instruction set"
I think this seems to be connected with the "-march" switch but I dont know how to fix it.
Since my gameserver is on a 32bit machine I would like to know if it is possible to compile the modules for it on the 64bit rootserver.
Maybe I need to change all the libraries of the gcc compiler to 32bit compatible ones but before I do that I wanted to ask if there is maybe another way.

gcc (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)

Thanks
More

cybermind
02-07-2007, 23:07
-m32

More
02-12-2007, 18:00
thank you very much
but now i get the error:

/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status

i think the compiler cant find the 32bit libraries.
the libs are in /lib /lib64 and /lib32 but i dont know how to tell the compiler to use only the 32bit ones

cybermind
02-13-2007, 01:15
Try adding -L/usr/lib32

More
02-14-2007, 15:26
i tried that but i get the same error :(
ty anyways

I think the problem is that in the /lib32 folder there are the 32bit files like the 64bit ones in the /lib64 folder
but in the /lib folder there are files which are not represent in one of the other folders so i think they are only 64bit