当前位置: 技术问答>linux和unix
aix pthread.h 使用编译出错
来源: 互联网 发布时间:2016-02-22
本文导语: 各位大侠: 我在aix5.2上编译一个服务程序, 需要多线程服务, 刚加入pthread.h , 编译过程便出错。 #include . . 编译代码 rm *.o rm *.lis rm *.c proc pub.pc proc server.pc cc -O3 -q32 -c -lpthread pub.c cc -O3 -q32...
各位大侠:
我在aix5.2上编译一个服务程序, 需要多线程服务,
刚加入pthread.h , 编译过程便出错。
#include
.
.
编译代码
rm *.o
rm *.lis
rm *.c
proc pub.pc
proc server.pc
cc -O3 -q32 -c -lpthread pub.c
cc -O3 -q32 -c -lpthread server.c
cc -q64 -o recv_msg4000 -I$usr/include -lpthread pub.o server.o -L/oracle/app/oracle/product/9.2.0/lib32/ -lclntsh -lld -lm `cat /oracle/app/oracle/product/9.2.0/lib32/sysliblist` -lm -lc_r -L/usr/opt/libiconv/lib/ -liconv
编译错误如下:
ro*C/C++: Release 9.2.0.4.0 - Production on Thu Dec 20 21:19:23 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /oracle/app/oracle/product/9.2.0/precomp/admin/pcscfg.cfg
Parser error at line 579, column 32, file /usr/include/sys/thread.h:
Error at line 579, column 32 in file /usr/include/sys/thread.h
sigset_t sigmask;
...............................1
PCC-F-02209, Macro invocation has incorrect number of arguments
Syntax error at line 579, column 25, file /usr/include/sys/thread.h:
Error at line 579, column 25 in file /usr/include/sys/thread.h
sigset_t sigmask;
........................1
PCC-S-02201, Encountered the symbol "1" when expecting one of the following:
( * an identifier,
Syntax error at line 579, column 25, file /usr/include/sys/thread.h:
Error at line 579, column 25 in file /usr/include/sys/thread.h
sigset_t sigmask;
........................1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
; , ( [ * ? | & + - / % . ^ | & == != = ++ --
->
The symbol "(" was substituted for ")" to continue.
Syntax error at line 489, column 1, file /usr/include/math.h:
Error at line 489, column 1 in file /usr/include/math.h
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 494, column 1, file /usr/include/math.h:
Error at line 494, column 1 in file /usr/include/math.h
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 500, column 1, file /usr/include/math.h:
Error at line 500, column 1 in file /usr/include/math.h
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 183, column 2, file /usr/include/sys/msg.h:
Error at line 183, column 2 in file /usr/include/sys/msg.h
msgqnum_t msg_qnum; /* # of messages on q */
。。。。。。
找了很多资料,都不能解决。 请高手帮忙看看。, 多谢。
我在aix5.2上编译一个服务程序, 需要多线程服务,
刚加入pthread.h , 编译过程便出错。
#include
.
.
编译代码
rm *.o
rm *.lis
rm *.c
proc pub.pc
proc server.pc
cc -O3 -q32 -c -lpthread pub.c
cc -O3 -q32 -c -lpthread server.c
cc -q64 -o recv_msg4000 -I$usr/include -lpthread pub.o server.o -L/oracle/app/oracle/product/9.2.0/lib32/ -lclntsh -lld -lm `cat /oracle/app/oracle/product/9.2.0/lib32/sysliblist` -lm -lc_r -L/usr/opt/libiconv/lib/ -liconv
编译错误如下:
ro*C/C++: Release 9.2.0.4.0 - Production on Thu Dec 20 21:19:23 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /oracle/app/oracle/product/9.2.0/precomp/admin/pcscfg.cfg
Parser error at line 579, column 32, file /usr/include/sys/thread.h:
Error at line 579, column 32 in file /usr/include/sys/thread.h
sigset_t sigmask;
...............................1
PCC-F-02209, Macro invocation has incorrect number of arguments
Syntax error at line 579, column 25, file /usr/include/sys/thread.h:
Error at line 579, column 25 in file /usr/include/sys/thread.h
sigset_t sigmask;
........................1
PCC-S-02201, Encountered the symbol "1" when expecting one of the following:
( * an identifier,
Syntax error at line 579, column 25, file /usr/include/sys/thread.h:
Error at line 579, column 25 in file /usr/include/sys/thread.h
sigset_t sigmask;
........................1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
; , ( [ * ? | & + - / % . ^ | & == != = ++ --
->
The symbol "(" was substituted for ")" to continue.
Syntax error at line 489, column 1, file /usr/include/math.h:
Error at line 489, column 1 in file /usr/include/math.h
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 494, column 1, file /usr/include/math.h:
Error at line 494, column 1 in file /usr/include/math.h
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 500, column 1, file /usr/include/math.h:
Error at line 500, column 1 in file /usr/include/math.h
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 183, column 2, file /usr/include/sys/msg.h:
Error at line 183, column 2 in file /usr/include/sys/msg.h
msgqnum_t msg_qnum; /* # of messages on q */
。。。。。。
找了很多资料,都不能解决。 请高手帮忙看看。, 多谢。
|
是不是你的代码里面缺少};