This content has been marked as final. Show 10 replies
Nice one. I think for this you need to install on a ufs volume instead of a hfs[+] volume. ufs doe make a differenc in case...
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?
I realised I could not find sqlca.h either. The links went nowhere.
So I copied over sqlca.h and sqlda.h from a Sun Solaris and after playing around for a bit with compiler options I managed to get a Pro*C program to compile.
Hooray! Pro*C works on the MAC. With some effort.
It's about 8 years since I used Pro*C, but you make me feel to start again write some code (I must have some
floppy around with source code for 7.x) on Mac Os X.
Will you be so kind to share the compiler options?
Are you using 1.2 or 1.5 version of XCode?
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).
yes I have that book in the bottom of my desk drawer, it is the one with a redish/brown strip along the top?
I have also adapted a make file from Sun Solaris to work on OS X to atomate the pre-compile and compile. Let me know if you want a copy or if you need the sqlca.h or sqlda.h
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".
I've got the precomp stage done fine. I now have a problem linking the resultant C source. I get an undefined symbol on _sqlcxt. What are the correct libraries to add into the link stage?