• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

Precompiling C++ with embedded PL/SQL code

I am using Pro*C/C++ Programmer to precompile some C++ code with embedded SQL statements.  My header files are both C++ and Oracle.  I set up my INCLUDE= precompiler option path to the Oracle header files.  This path precompiles OK.  The C++ header files, like #include <iostream.h> and others will not precompile.  I set up my SYSTEM_INCLUDE precompiler option as (c:\program files\microsoft visual studio\vc98\include}. Each time I attempt to precompile, I get an error message like "file cannot be found or illegal or out of range command. The error code is PCC-5-02015.  Am I setting up my precompiler options properly?  I need help!
0
fredsawyer
Asked:
fredsawyer
  • 5
  • 5
  • 3
1 Solution
 
nietodCommented:
Are you sure that you have files like <iostream.h>?  All the standard STL files are extenionless, like <iostream>.  The ones with extensions are non-standard and many copmpilers won't provide them....
0
 
fredsawyerAuthor Commented:
nietod,
I just followed my path to the MS VB98 Include file and found iostream.h and many other header files with the .h extension. I even took the .h extensions off of the C++ header files and I still got precompile error messages.  Any more suggestions?
0
 
nietodCommented:
What compiler is this for?

What do you mena by "pre-compile"   Note that most of the contents of STL headers, like <iostream> are templates and there probably are limiations to how much precompilation can be done on them.  i.e. they can be expanded in different ways for different template parameters, so there are limits to what can be done "ahead of time".   But all this depends on the compiler and what "pre-compile" means in this context.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
AxterCommented:
>>I set up my SYSTEM_INCLUDE precompiler option as
>>(c:\program files\microsoft visual studio\vc98\include}.

Did you try using the short name version.  Some programs can't take long file/directory names.


0
 
AxterCommented:
You also might want to try using "" double quotes around it.
Could you post what you use as a directory for Oracle?
0
 
fredsawyerAuthor Commented:
Oracle sells some SW called Pro*C/C++ Precompiler. This SW allows SQL or PL/SQL code to be embedded in a C++ host program.  Once you write the host C++ program with the embedded SQL statements, the host program must be precompiled by the precompiler so that it will contain the necessary "hooks and handles" for regular C++ compiling.  This allows one to transfer data from a host array into an Oracle table, for example.  By the way, this is what I am really trying to do, among other things.
0
 
nietodCommented:
Can the pre-compiler handle templates.  the <iostream> file containes templates and that might be too much for it to handle.

You could test this by writting a simple program that just has a single template (that you write) in it.
0
 
AxterCommented:
Did you try my suggestions?
0
 
fredsawyerAuthor Commented:
Axter,
Here is the path to my Oracle header files:
d:\oracle\ora81\precomp\public

Oracle header files like #include <oraca.h> and #include <stdio.h> all precompiled OK. But not the C++ header files!
0
 
AxterCommented:
>>d:\oracle\ora81\precomp\public

The orcale header file is using short names.
Try using the short name version of the pathed for the standard C++ header files.

Do you understand what I mean by short-name?
0
 
AxterCommented:
What OS are you using? NT/98/2000
0
 
fredsawyerAuthor Commented:
Axter,
Just got out of a long meeting. Got all of your suggestions and will try them tonight. Am on the east coast. Will give U the results in the AM, your time.
P.S. Using OS 98!
0
 
fredsawyerAuthor Commented:
Axter,
It worked!  I put double quotes around the path to the C++ header files and the precompiler worked fine!  Thanks!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now