ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 :
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
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 :
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
AFAIK .pc files are the ones used by 'pkg-config' - have you tried
man 1 pkg-config
?
If yes, have you read the DESCRIPTION part (line #13 in my case) ?
The part gives a typical command line.
Maybe in your case .pc files are used for something else - I don't know.
When I used to work with Pro*C, you wrote your C and SQL code into a .pc file, then the Oracle Pre-compiler converted the Oracle stuff into pure C (ie you get a *.c file), then you used a normal C compiler to compile and link.
Your 1st post sounds like you're trying to compile, then pre-compile.
When I used to work with Pro*C, you wrote your C and SQL code into a .pc file, then the Oracle Pre-compiler converted the Oracle stuff into pure C (ie you get a *.c file), then you used a normal C compiler to compile and link.
Your 1st post sounds like you're trying to compile, then pre-compile.
yeah that's what i did all the time !!but now in the makefile where i try to lauch first it compile the .pc file with the command cpp then the makefile launch the command to precompile with pro*C to get in the final the pure C .*
the problem that i'm try to port the product and those makefile which are prepared for compiling its better to not modify it.that's the problem for me .the main question is :can we launch the cpp command ion .pc file ?
if that possible what's the idea for doing it ?
or can i just do what i usually do that i precompile .pc file then compile it with gcc?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.