?
Solved

Precompiling C++ with embedded PL/SQL code

Posted on 2001-07-09
13
Medium Priority
?
406 Views
Last Modified: 2012-08-13
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
Comment
Question by:fredsawyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 3
13 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 6266165
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
 

Author Comment

by:fredsawyer
ID: 6266283
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
 
LVL 22

Expert Comment

by:nietod
ID: 6266392
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 30

Expert Comment

by:Axter
ID: 6266504
>>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
 
LVL 30

Accepted Solution

by:
Axter earned 200 total points
ID: 6266513
You also might want to try using "" double quotes around it.
Could you post what you use as a directory for Oracle?
0
 

Author Comment

by:fredsawyer
ID: 6266523
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
 
LVL 22

Expert Comment

by:nietod
ID: 6266534
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
 
LVL 30

Expert Comment

by:Axter
ID: 6266536
Did you try my suggestions?
0
 

Author Comment

by:fredsawyer
ID: 6266584
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
 
LVL 30

Expert Comment

by:Axter
ID: 6266720
>>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
 
LVL 30

Expert Comment

by:Axter
ID: 6266736
What OS are you using? NT/98/2000
0
 

Author Comment

by:fredsawyer
ID: 6266901
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
 

Author Comment

by:fredsawyer
ID: 6270633
Axter,
It worked!  I put double quotes around the path to the C++ header files and the precompiler worked fine!  Thanks!!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question