如何将标志传递给 IBM xlc 编译器?

如何将标志传递给 IBM xlc 编译器?

我想在 aix 上构建 samba4,gcc 给我错误,所以我想尝试 xlc ibm 编译器 但给我这个错误

    "../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h", line 49.28: 1506-277 (S) Syntax error: possible missing ';' or ','?
"../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h", line 41.1: 1506-485 (S) Parameter declaration list is incompatible with declarator for GSSAPI_CPP_START.
"../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h", line 49.28: 1506-277 (S) Syntax error: possible missing ';' or ','?
"../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h", line 41.1: 1506-485 (S) Parameter declaration list is incompatible with declarator for GSSAPI_CPP_START.
Waf: Leaving directory `/usr/local/src/samba-4.0.25/bin'
Build failed:
 -> task failed (err #1): 
        {task: cc dnsrecord.c -> dnsrecord_1.o}
 -> task failed (err #1): 
        {task: cc dnsutils.c -> dnsutils_1.o}
make: The error code from the last command is 1.

我在网上搜索,发现

http://www-01.ibm.com/support/docview.wss?uid=swg1LI75061

有趣的是“你可以-‍qcpluscmt使用‍‍‍‍ 让 C 编译器接受 C++ 风格”

所以我尝试用这些行进行编译

CFLAGS='-qcpluscmt' CXXFLAGS=$CFLAGS CPPFLAGS='-I/opt/freeware/include' LDFLAGS=' -L/opt/freeware/lib' ./configure --prefix=/opt/mg --check-c-compiler=xlc
 make clean
CFLAGS='-qcpluscmt' CXXFLAGS=$CFLAGS CPPFLAGS='-I/opt/freeware/include' LDFLAGS=' -L/opt/freeware/lib' make

但给我同样的错误。怎么了?

答案1

标志是正确的,错误是放置外部标头

相关内容