G++ an multiple architectures

Jerry Feldman gaf at blu.org
Mon Nov 13 15:32:26 EST 2006


I've got an Intel X86_64 box that I installed with the intention of doing 
both 64-bit and 32-bit development. I installed the compatibility arch 
packages.
On one of the systems, before I installed the compatibility systems I 
could compile a simple C++ hello world program (g++ hello.cc -o hello):
#include <iostream>
int main()
{
        std::cout << "hello, world!" << "\n";
        return 0;
}
The executable was built as a 64-bit binary. However, I have a number of 
32-bit libraries I need to link some code with, and I found that using the 
-m32 switch was not working because I had not installed the 32-bit 
support. After installing, I am no longer able to compile either 64-bit or 
32-bit. I was able to log into an RHEL 4.0 Opteron system, and I could 
build either 32-bit or 64-bit with no problem. 
Here is a partial error list:
In file included from hello.cc:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.5/../../../../include/c++/3.4.5/iostream:44:28: 
bits/c++config.h: No such file or directory

-- 
Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix
http://www.blu.org


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Discuss mailing list