This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiling 32bit c program in 64 bit


flope wrote:
Hi,
This is my first post.
My platform: dell pentium4HT, Ubuntu 64-bit 6.10
I have a program that I would like to compile for this machine:


Can I compile the program in other 32 bit machine and I use it in my 64
bits?
Yes, if you have installed any 32-bit shared libraries it requires.
I have also tried this:

g++ -m32 -o rate4site.exe -O3 *.cpp

among several screen messages it appears repeatedly the following error:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or
directory

I have already installed the following libraries:
 a32-libs (version 1.5ubuntu5)
 lib32stdc++6 (version 4.1.1-13ubuntu5)
 libc6-dev-i386 (version 2.4-1ubuntu12)

As you can see, you need the 32-bit header versions here. Not that I have any personal desire to mess with an application which includes stub.h. Ubuntu handles the coexisting 32- and 64-bit headers and libraries contrary to accepted schemes, so you take on this responsibility yourself when you choose Ubuntu. Normally, you wouldn't take your 32-bit installation one library and one header at a time; you would install all the 32-bit development and compatibility libraries provided by your distro as a starting point.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]