This content has been marked as final. Show 10 replies
if you're looking for sqlca.h and sqlda.h then it sounds like you are trying to do some Pro*C? So have you got Pro*C to work on OS X?
I have not ried yet but I am thinking of doing so and I am wondering if you succeeded.
I have the sqlca.h and sqlda.h but I have the installation on an hfs volume.
If you've got Pro*C working then do you have any tips? What are the libraries that the make file needs to link to and are they there on the mac? Which C compiler needs to be used?
Hello Oscar and all
Here are the answers and an example.
I am running XCode 1.5 and which gives me the following:
Paula:~/pdc oracle$ cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1640)
I precompile as follows:
Paula:~/pdc oracle$ proc iname=frog.pc oname=frog.c sqlcheck=semantics userid=paul/paul@fish maxopencursors=50
Pro*C/C++: Release 10.1.0.3.0 - Production on Tue Sep 21 10:19:54 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
System default option values taken from: /Volumes/u01/app/oracle/OraHome_1/precomp/admin/pcscfg.cfg
and I compile cleanly as follows:
Paula:~/pdc oracle$ cc -L$ORACLE_HOME/lib -L/usr/lib -lclntsh -o frog frog.c
and I run my trivial test program:
2 pap records
Hence we have serious Oracle programming on the mac!
BTW, I have sqlca.h and sqlda.h in the same local directory as my source file:
Paula:~/pdc oracle$ head frog.pc
#define NOT_FOUND 1403
main ( argc, argv )
Thanks Paul for your informations.
I will finish installing 10g on my Powerbook (XCode 1.5)
this evening (I have to run the last catalog scripts
after creating the first db) and I will use your example as a starting point.
Meanwhile, last week I was reading
"Programmer's Guide to Oracle Pro*C/C++ Precompiler
Release 2.2" (I still have the book).
the books with the redish stripe were for "programmers", while the ones with the bluish stripe were for "DBAs".
Thanks for your kind offer, in case I need more help I will try to contact you.
Just keep in mind that I'm doing this at home during my free time,
so it might take one - four weeks until I run into troubles with Pro*C.
(meanwhile I have started a thread describing the details of my 9i and 10g install)
I'm happy to inform you that I compiled a Pro*C program.
First, I downloaded the whole Oracle Documentation for 10g.
Then, I copied the definition of sqlca.h from the Pro*C manual into a local file.
Next, I copied the sample1.pc example from the manual into a local "frog.pc" file (I changed
like you explained, being sqlca.h a local file)
So I run the precompiler and the compiler using
the command line parameter that you used,
after changing "paul/paul" with "scott/tiger"
(Tiger was the name of Scott Urman's cat, did you know it?).
In the Kernighan/Ritchie C manual, it was written something like: "The most difficult thing is to get your first program compiled. Everything else will be much easier".