Created attachment 423687 [details] Output from G++ (second example) Description of problem: Standard headers like <exception> or <vector> are not loadable, thus all code depending on them fails to compile. Version-Release number of selected component (if applicable): 4.4.4-2.fc12 How reproducible: $ echo " #include <exception> int main() { return 42; }" | g++ -x c++ - results in: In file included from <stdin>:2: /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/exception:37:28: error: bits/c++config.h: No such file or directory In file included from <stdin>:2: /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/exception:120: error: expected constructor, destructor, or type conversion before ‘(’ token /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/exception:142: error: expected constructor, destructor, or type conversion before ‘}’ token $ echo " #include <exception> int main() { return 42; }" | g++ -x c++ - results in a long sequence of errors (included as attachment)
Sorry the second one had #include <vector> Plus, I found out that, even though gcc-c++.x86_64 exists /usr/include/i686-redhat-linux exists but not /usr/include/x86_64-redhat-linux
That means you've installed libstdc++-devel.i686 and not libstdc++-devel.x86_64. You need to former to compile 32-bit programs (i.e. g++ -m32), while the latter for 64-bit programs.
Well, gcc-c++ should depend on libstdc++-devel of the appropriate architecture. as it is mostly useless on its own. Thanks anyway.