ORACLE 10.2 Pro*C precompiler not reading header file
From Metalink
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the
following
:
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.
Syntax error at line 88, column 7, file /usr/include/gconv.h:
Error at line 88, column 7 in file /usr/include/gconv.h
size_t *);
Solution Description
The 'sys_include' and 'include' precompiler options are not set
correctly. Set 'sys_include' and 'include' precompiler options
in the pcscfg.cfg file located at $ORACLE_HOME/precomp/admin or
include on the command line when invoking 'proc'.For example, here is a recommended way to set the variable properly:
Run the following command to obtain the compiler location:
gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-128)Use the path returned above (remove specs and replace with include)
sys_include=($ORACLE_HOME/precomp/public,
/usr/lib/gcc-lib/i386-redhat-linux7/2.96/include,
/usr/include)
include=(/u02/app/oracle/product/8.1.5/precomp/public)
include=(/u02/app/oracle/product/8.1.5/rdbms/demo)
include=(/u02/app/oracle/product/8.1.5/network/public)
include=(/u02/app/oracle/product/8.1.5/plsql/public)
I am guessing that the part of having both sysinclude and include is your issue.
Will Pro*C work with MSVC 6?
In the custom build tab for the .pc file.
I pop this in the outputs. The output of proc, is a cpp file
$(ProjDir)\$(InputName).cpp
There are 2 lines in the commands window. One to set the MSVC 6 environment. The other to invoke proc on the .pc file.
call vcvars32.bat
proc sqlcheck=semantics userid=scott/tiger@instance code=cpp char_map=string sqlcheck=semantics parse=partial mode=ansi $(ProjDir)\$(InputName).pc include=c:\ora920\oci\include include="%MSVCDIR%\include" include="$(MSDEVDIR)\..\vc\include" include="$(MSDEVDIR)\..\..\vc98\include"
You must add the .cpp file to your project in order to compile it. If you need to debug, set your breakpoints in the .cpp file.
That pretty much covers it.
Related Topics
Unix/Linux Ipc: Reading from a Pipe. How to Know Length of Data at Runtime
Goroutine in Io Wait State for Long Time
How to Connect to Sftp Using Linux Command from Perl
Socket Programming Send() Return Value
In Linux, How to Do System Calls Through Gnu Arm Assembly
Building Robert Nelson's Linux Kernel into Yocto(Daisy) for Beaglebone Black
Linux Kernel Code in Memory Check with Sha256 Sum
How to Add a Directory to The Perl Library Path at The System Level
Execute Command as a String in Bash
How to Install G++ on Centos Without Root
Where Is G_Multi Configured in Beaglebone Black
Vagrant - How to Mount The Virtualbox Shared Folder? ("Vboxsf" Not Available)
How to Add More Algorithm in Cryptoapi in Linux
Linux Shell Kill Signal Sigkill && Kill
"Nothing to Commit (Working Directory Clean)" When a Folder Has Been Added
Linux Support 802.1Ag and Y1731