Compiler errors 编译器错误堆栈跟踪

Compiler errors 编译器错误堆栈跟踪,compiler-errors,g++,Compiler Errors,G++,在CentOS 5.9上编译时[gcc版本4.1.2 20080704(Red Hat 4.1.2-54)]。我的应用程序无法编译,出现以下错误: /opt/qt64/4.7.3/include/QtCore/qendian.h: In function ‘T qbswap(T) [with T = long long unsigned int]’: /opt/qt64/4.7.3/include/QtCore/qendian.h:278: error: ‘bswap_64’ was not d

在CentOS 5.9上编译时[
gcc版本4.1.2 20080704(Red Hat 4.1.2-54)
]。我的应用程序无法编译,出现以下错误:

/opt/qt64/4.7.3/include/QtCore/qendian.h: In function ‘T qbswap(T) [with T = long long unsigned int]’:
/opt/qt64/4.7.3/include/QtCore/qendian.h:278: error: ‘bswap_64’ was not declared in this scope
/opt/qt64/4.7.3/include/QtCore/qendian.h: In function ‘T qbswap(T) [with T = unsigned int]’:
/opt/qt64/4.7.3/include/QtCore/qendian.h:282: error: ‘bswap_32’ was not declared in this scope
/opt/qt64/4.7.3/include/QtCore/qendian.h: In function ‘T qbswap(T) [with T = short unsigned int]’:
/opt/qt64/4.7.3/include/QtCore/qendian.h:286: error: ‘bswap_16’ was not declared in this scope
我不认为Qt 4.7.3有任何问题,因为代码在MSVC2010和Fedora 9上正确编译[
gcc版本4.3.0 20080428(Red Hat 4.3.0-8)(gcc)
]都是根据Qt 4.7.3编译的,不会发生意外


我的问题是,有没有办法让GCC告诉我以下任何或全部内容:在出现此错误之前,我代码中的最后一个位置,或者导致此编译器错误的完整代码跟踪,或者其他一些方法来确定如何修复我的代码?

最终,问题的解决方案是,在包含路径的前面有一个名为
byteswap.h
的文件,该文件是在
byteswap.h
的stdlib版本之前包含的。由于该文件不包含
bswap_64
bswap_32
bswap_16
的定义,因此生成了编译器错误


修复方法是将第三方库中的
byteswap.h
重命名为另一个没有冲突的名称。

CentOS可能没有这些
bswap
函数,或者它们位于不同的标题中。你查过了吗?没有。我该怎么检查呢?
grep-R bswap/usr/include/*
它似乎是在多个地方定义的
/usr/include/asm-i386/byteorder.h/usr/include/asm-x86\u 64/byteorder.h/usr/include/bits/byteswap.h/usr/include/byteswap.h/usr/include/mtd/jffs2 user.h/usr/include/netinet/in.h
好的,很酷。那么,
qendian.h
是否在其他地方寻找它们呢?