Quote:
Originally Posted by samitpmc
My problem is just opposite. I want to build x64 application from my 32 bit ubuntu machine with gcc 4.1.2 installed.
|
You need 64-bit .so files and/or .a files (and probably at least one startup .o file) for linking and you need g++ to be able to find them. From your symptom description below, I would guess you haven't even loaded those files. Once you have the files, I'm not sure what you need to set up so that g++ will find them.
Maybe some expert will answer (I'm definitely not). But meanwhile, here is the way I would attack the problem if I needed to do what you're trying:
Quote:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linuxgnu/4.1.2/../../../libm.so when searched for lm
|
Identify the problem files one at a time. You just identified the first (libm.so). As you fix each, the linker will identify more.
Check with your package manager to find out which 32-bit package contained that file.
Go to the ftp site for your distribution and download (not install) the 64-bit build of that same package.
Open the package with ark (instead of the package manager) to extract the .gz file that contains the package data.
Open that .gz file and see what directories contain .so, .a or .o files. Make "64" versions of those same directories (for example, you will find libm.so goes in /usr/lib, so make a corresponding /usr/lib64 directory).
Drag each of those files from the .gz to the "64" directory you created for it.
Figure out the right g++ switches or environment variables to make it look there.
Retry the build.
I'm sure experts know a cleaner way to automate some of the above steps. But the above is the way I know.
Quote:
Originally Posted by resetreset
YOU CANT RUN A 32 BIT EXE ON A 64BIT MACHINE!!! WHAT KIND OF PERSON KNOWS THE TERMS "32-BIT", "64-BIT", PROGRAMS, BUT DOESNT KNOW THAT??!!
|
I tried your profile and the link to your other posts to see if you routinely post things like the above. It didn't look that way. So what's the problem? You replied to an old post (in a thread someone reopened with a significant change of question). Your reply is totally incorrect as well as missing the point of even the old post you quoted. With the all caps and "what kind of person" one would assume you're just trying to provoke a fight. Probably I misunderstood what I saw in your other posts and you are just trying to provoke a fight. Please don't. Please allow this thread to provide useful answers to those looking for help.