Raised This Month: $51 Target: $400
 12% 

Compile a 32bit dll on a 64bit machine


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
More
Member
Join Date: Nov 2004
Location: Internet
Old 02-06-2007 , 13:10   Compile a 32bit dll on a 64bit machine
Reply With Quote #1

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
More is offline
Old 02-07-2007, 21:52
Zenith77
This message has been deleted by sawce the snail. Reason: completely irrelevant
cybermind
Senior Member
Join Date: Oct 2004
Old 02-07-2007 , 23:07   Re: Compile a 32bit dll on a 64bit machine
Reply With Quote #2

-m32
cybermind is offline
More
Member
Join Date: Nov 2004
Location: Internet
Old 02-12-2007 , 18:00   Re: Compile a 32bit dll on a 64bit machine
Reply With Quote #3

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
More is offline
cybermind
Senior Member
Join Date: Oct 2004
Old 02-13-2007 , 01:15   Re: Compile a 32bit dll on a 64bit machine
Reply With Quote #4

Try adding -L/usr/lib32
cybermind is offline
More
Member
Join Date: Nov 2004
Location: Internet
Old 02-14-2007 , 15:26   Re: Compile a 32bit dll on a 64bit machine
Reply With Quote #5

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

Last edited by More; 02-14-2007 at 15:29.
More is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode