Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Precompiling C++ with embedded PL/SQL code

Posted on 2001-07-09
13
Medium Priority
?
409 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
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

926 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