在我的程序里有:
#include <netinet/in.h>
将其去掉后,就没错误。请问是不是少包含了什么库文件,我的是这样的:
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <unistd.h>
错误如下:
Error at line 0, column 0 in file ChkYdAcc.pc
PCC-F-02102, Fatal error while doing C preprocessing
Error at line 280, column 10 in file /usr/include/netinet/in.h
280 uint64_t ntohll(uint64_t);
280 .........1
280 PCC-S-02201, Encountered the symbol "ntohll" when expecting one of the
following:
; , = ( [
The symbol ";" was substituted for "ntohll" to continue.
Error at line 281, column 10 in file /usr/include/netinet/in.h
281 uint64_t htonll(uint64_t);
281 .........1
281 PCC-S-02201, Encountered the symbol "htonll" when expecting one of the
following:
; , = ( [
The symbol ";" was substituted for "htonll" to continue.
proc的程序最好跟别的分开,写成多个程序,编译成c文件后,然后跟别的文件一起编译连接,这样可以避免很多麻烦。
ajiefudan(阿杰) 说的极是
proc的编译过程很糟糕的!!!!
你最后把ORACLE的低层操作用PROC封装成函数,然后在别的程序里就不要出现PROC了。
比如:
orc_commit();
ora_rollback();
ora_connect();
ora_disconnect();
ora_select();
ora_query(); // for insert,update,delete