编译Linux c++代码的几个问题

1.c++项目移植到不同版本的linux平台,需要重新编译一次。可能并不能顺利地编译通过,
  问题可能出现:gcc编译器的版本,较高版的,对语法的检查更加的严格,遇到的问题是,
  include文件的依赖,template语法的声明,所依赖的系统库的缺失,在64位系统下编译
  32位程序等等。
 
2./usr/bin/ld: cannot find -lstdc++ 解决
  
sudo yum search "static" |grep "\(libc\|stdc\+\+\)"

将搜索到到包,安装上就行了。

3.x86_64 Linux Error: gnu/stub-32.h

Fix for the RHEL/CentOS 5.x for GCC gnu/stub-32.h missing error
Type the following yum command:
# yum -y install glibc-devel.i386
Fix for the RHEL/CentOS 6.x for GCC gnu/stub-32.h missing error
Type the following yum command:
# yum -y install glibc-devel.i686 glibc-devel

请索引帮助文档:
http://www.cyberciti.biz/faq/x86_64-linux-error-gnustub-32h-missing-error-and-solution/

4. uuid/uuid.h 找不到

yum -y install libuuid-devel