Aix

如何將標誌傳遞給 IBM xlc 編譯器?

  • May 6, 2015

我想在 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

但是給我同樣的錯誤。怎麼了?

標誌是正確的錯誤是放置外部標題

引用自:https://unix.stackexchange.com/questions/200664