PDA

View Full Version : 32 bit to 64 bit



gayathris
July 24th, 2012, 01:10 PM
I have done a c++ program on ubuntu(32 bit) and is compiling perfectly. My server is of 64 bit. On putting in server, I get an error that " size of curl is negative". I think it is because of change in bits.

How should I change it from 32 to 64 to make it run on server? Or do I need to add some library in server? if so which ones?

Please help out.

Cheesemill
July 24th, 2012, 02:02 PM
You need to recompile it for the correct target architecture (amd64).

Or you could try installing ia32-libs on the server to allow it to run 32-bit programs.

nehalem04
July 24th, 2012, 02:32 PM
The size of data types(int, float etc.) should be different in 32bit and 64bit OS. You've to recompile your program in 64bit OS to use the executable there.

Bufeu
July 24th, 2012, 04:22 PM
I have done a c++ program on ubuntu(32 bit) and is compiling perfectly. My server is of 64 bit. On putting in server, I get an error that " size of curl is negative". I think it is because of change in bits.

How should I change it from 32 to 64 to make it run on server? Or do I need to add some library in server? if so which ones?

Please help out.Yes, it's possible to compile (but not run!) 64 bit programs on a 32 bit system, if you are using a cross-compile (like GCC) and the full set of header files and libraries for the target platform. http://ubuntuforums.org/showthread.php?t=518979

oldos2er
July 24th, 2012, 05:57 PM
Moved to Packaging and Compiling Programs.