问题
I am trying to compile a C++ application on SUN server using the compiler Sun C++ 5.9 SunOS_sparc Patch 124863-01. It seems that the Pro*C++ compiler is not able to identify some system header files like vector
, list
...
I am new to C++ and I am wondering if the compiler could not find the header file itself, or it cannot identify it since it was specified without .h
extension.
I checked also the pcscfg.cfg
configuration file (below) which should point to the system header files for pro*C compilation and it seems correct as well:
sys_include=(/usr/include)
ltype=short
PCC-W-02109, SQLCHECK=NONE is no longer supported.. using SYNTAX
Error at line 6, column 10 in file BillImageRef.pcpp
#include <vector>
.........1
PCC-S-02015, unable to open include file
Error at line 6, column 10 in file ./include/BillImageRef.hpp
#include <list>
.........1
PCC-S-02015, unable to open include file
Error at line 7, column 10 in file ./include/BillImageRef.hpp
#include <map>
Any ideas to solve this issue?
回答1:
In order to point to the exact location of standard library headers, you may need more sys_include
definitions like:
sys_include=/ade/aime_rdbms_9819/oracle/precomp/public
sys_include=/usr/include,/usr/lib/gcc-lib/i486-suse-linux/2.95.3/include
sys_include=/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include
sys_include=/usr/lib/gcc-lib/i386-redhat-linux7/2.96/include
sys_include=/usr/include
as stated in the following link: Precompiler Options
回答2:
If you are using any Visual Studio's variables or Environment variables, use sys_include instead of include. This was a major issue for me while compiling in VS 2013.
来源:https://stackoverflow.com/questions/17131697/pcc-s-02015-unable-to-open-include-file