eljuventino |
09-24-2009 10:43 AM |
cpp command for .pc file
hello everyone !!!i'm here again for he help and i'm grateful for all the members that help me go on with my project!!i'm porting a product from aix system to linux rhel5 system !!
i'm compiling withy gcc and i'm using pro*C for precompiling!!
i have in one of the makefiles that i have to compile .pc file with cpp then put the reslt of this command in ...tmp.pc than precompile this one with pro*C :
1- do a cpp command to .pc file.
2-put the result of this command to ...tmp.pc file.
3-precompile with pro*C the ...tmp.pc file.
is that possible to do a cpp command to a .pc file ?
anyway i execute the cpp command to the .pc file
then this result :
Code:
# 1 "su_lgm_lib_commit.pc"
# 1 "<interne>"
# 1 "<ligne de commande>"
# 1 "su_lgm_lib_commit.pc"
# 22 "su_lgm_lib_commit.pc"
# 1 "/usr/local/oracle/9.2.0/precomp/public/sqlca.h" 1
# 59 "/usr/local/oracle/9.2.0/precomp/public/sqlca.h"
struct sqlca
{
char sqlcaid[8];
int sqlabc;
int sqlcode;
struct
{
unsigned short sqlerrml;
char sqlerrmc[70];
} sqlerrm;
char sqlerrp[8];
int sqlerrd[6];
char sqlwarn[8];
char sqlext[8];
};
struct sqlca sqlca
# 94 "/usr/local/oracle/9.2.0/precomp/public/sqlca.h"
;
# 23 "su_lgm_lib_commit.pc" 2
# 1 "su_lgm.h" 1
# 18 "su_lgm.h"
# 1 "/home/oracle/Open2/syu/inc/su_globals.h" 1
# 22 "/home/oracle/Open2/syu/inc/su_globals.h"
static char globals_h[]="@(#)$Workfile: su_globals.h $,$Revision: 2.1 $,$Modtime: 30 Jan 2003 15:36:32 $";
static char su_globals_h[] = "@(#)## su_globals.h 02.00.00 17/07/97 $Revision: 2.1 $";
# 19 "su_lgm.h" 2
# 1 "/home/oracle/Open2/syu/inc/su_logclass.h" 1
# 21 "/home/oracle/Open2/syu/inc/su_logclass.h"
static char logclass_h[]="@(#)$Workfile: su_logclass.h $,$Revision: 2.1 $,$Modtime: 05 Feb 2003 11:39:48 $";
static char su_logclass_h[] = "@(#)## su_logclass.h 02.01.01 07/10/97 $Revision: 2.1 $";
# 20 "su_lgm.h" 2
#include "/usr/include/stdio.h"
#include "/usr/include/features.h"
#include "/usr/include/sys/cdefs.h"
#include "/usr/include/bits/wordsize.h
#include/usr/include/gnu/stubs.h"
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4
# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
# 8 "/usr/include/gnu/stubs.h" 2 3 4
# 353 "/usr/include/features.h" 2 3 4
# 29 "/usr/include/stdio.h" 2 3 4
...
after that the precompilatin with pro*C and i got those errors:
Code:
Pro*C/C++: Release 9.2.0.4.0 - Production on Thu Sep 24 13:21:37 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Error at line 0, column 0 in file su_lgm_lib_commit_tmp.pc
PCC-F-02102, Fatal error while doing C preprocessing
Error at line 44, column 30 in file su_lgm_lib_commit_tmp.pc
44 # 1 "/usr/include/stdio.h" 1 3 4
44 .............................1
44 PCC-S-02014, Encountered the symbol "3" when expecting one of the follo
wing:
newline,
Error at line 45, column 31 in file su_lgm_lib_commit_tmp.pc
45 # 28 "/usr/include/stdio.h" 3 4
45 ..............................1
45 PCC-S-02014, Encountered the symbol "4" when expecting one of the follo
wing:
newline,
Error at line 46, column 33 in file su_lgm_lib_commit_tmp.pc
46 # 1 "/usr/include/features.h" 1 3 4
46 ................................1
46 PCC-S-02014, Encountered the symbol "3" when expecting one of the follo
wing:
newline,
Error at line 47, column 35 in file su_lgm_lib_commit_tmp.pc
47 # 329 "/usr/include/features.h" 3 4
47 ..................................1
47 PCC-S-02014, Encountered the symbol "4" when expecting one of the follo
wing:
newline,
Error at line 48, column 34 in file su_lgm_lib_commit_tmp.pc
48 # 1 "/usr/include/sys/cdefs.h" 1 3 4
48 .................................1
48 PCC-S-02014, Encountered the symbol "3" when expecting one of the follo
wing:
newline,
Error at line 49, column 36 in file su_lgm_lib_commit_tmp.pc
49 # 313 "/usr/include/sys/cdefs.h" 3 4
49 ...................................1
49 PCC-S-02014, Encountered the symbol "4" when expecting one of the follo
wing:
newline,
Error at line 50, column 38 in file su_lgm_lib_commit_tmp.pc
50 # 1 "/usr/include/bits/wordsize.h" 1 3 4
50 .....................................1
50 PCC-S-02014, Encountered the symbol "3" when expecting one of the follo
wing:
newline,
Error at line 51, column 36 in file su_lgm_lib_commit_tmp.pc
51 # 314 "/usr/include/sys/cdefs.h" 2 3 4
51 ...................................1
51 PCC-S-02014, Encountered the symbol "3" when expecting one of the follo
wing:
newline,
Error at line 52, column 35 in file su_lgm_lib_commit_tmp.pc
52 # 330 "/usr/include/features.h" 2 3 4
52 ..................................1
52 PCC-S-02014, Encountered the symbol "3" when expecting one of the follo
wing:
newline,
obviously all those problem are because the precompile doesn't understand 1 23 near the .h file i tried to replace those number with include it works and the errors goes away but it's evident it's not the correct solution!!
finally i tried to precompile directly the .pc file it works but the problem but i don't undersatn why the creators of the product do this when they compile the code in AIX.
i hope that u can help me with this!!!
any idea that can help me with this
|