home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / oracle / 2716 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  2.3 KB

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