Using a g++ 3.3 library with g++ 4
February 28, 2006
Leave a comment
There are many incompatibilties between g++ 3.3 and g++ 4:
Here is what I add to my configure.ac to make g++ 4 compatible with g++ 3.3:
################################### # Using g++ 3.3 library with gcc 4 ################################### if $CXX --version | grep 'g++ (GCC) 4.' > /dev/null; then AC_MSG_NOTICE([gcc 4 detected. Adding flags to be compatible with gcc 3.]) #http://gcc.gnu.org/bugs.html#cxx_rvalbind CXXFLAGS="-fno-access-control ${CXXFLAGS}" #http://gcc.gnu.org/PR11751 CXXFLAGS="-fno-strict-aliasing ${CXXFLAGS}" #http://gcc.gnu.org/onlinedocs/gcc/Compatibility.html CXXFLAGS="-fabi-version=1 ${CXXFLAGS}" fi
Categories: Uncategorized
gcc