home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!lll-winken!roxanne.llnl.gov!hudek
- From: hudek@polaris.llnl.gov (David Hudek)
- Newsgroups: comp.databases.oracle
- Subject: Pro*C / C++ ??
- Keywords: Pro*C, C++, integration
- Message-ID: <145384@lll-winken.LLNL.GOV>
- Date: 7 Jan 93 22:26:49 GMT
- Sender: usenet@lll-winken.LLNL.GOV
- Organization: Lawrence Livermore National Labs, Livermore CA
- Lines: 44
- Nntp-Posting-Host: roxanne.llnl.gov
- Originator: hudek@roxanne.llnl.gov
-
- <||>
-
- Question about Oracle's Pro*C precompiler:
-
- As I understand it and from a quick look at some output, this simply takes
- source code statements that start with a key phrase (EXEC SQL...) and
- translates them into C code and Oracle system calls.
-
- Given that, is there any reason why the output of Pro*C couldn't then be
- run through Sun's C++ compiler and produce good executables? (since the
- C++ compiler can obviously handle straight C code).
-
- We're in the process of moving from an old Sequent box to a Sun
- Workstation/Fileserver mode of operation and for various reasons
- (maintenance agreements, licenses, upgrades, beauracracy) it's
- much more convenient to pay for just a C++ compiler and drop the
- separate C compiler. We would initially still be writing code
- in C, but with the intent to migrate to C++ in the future.
-
- It seems like this should work out OK, but has anyone actually done it?
- I've written a number of applications in C with embedded SQL, using the
- Pro*C precompiler on the Sequent, but just as a useful system capability...
- I didn't install/administer it and the person who did is no longer here.
- Are there any strange administrative quirks to be aware of? Reasons
- why Pro*C and the C++ compiler won't work together on a Sun?
-
- The only potential problem I can think of at the moment from a programming
- standpoint is how function declarations are handled... Pro*C outputs
- something like "void sqlxxx1();" in the traditional C style, with the
- parameters unspecified. I don't know if the latest Sun compilers require
- functions to be declared in prototype form (i.e., the parameter types to also
- be declared at the time the function is, like "void sqlxxx1(int, float);"
- for example).
-
- Any advice/help? Will it work?
-
-
- Thanks in advance,
- dave hudek
- djh@llnl.gov
-
- < standard disclaimer: these are personal opinions only >
- < I do not speak for any organization >
-
-