10 Replies Latest reply: May 11, 2008 6:00 PM by 638650 RSS

    osx : sqlca.h is crushed at install

      since the OSX file system don't do upper/lower case distinction, in $ORA_HOME/precomp/public the link SQLCA.H to sqlca.h crushed sqlca.h

      Did it happened to somebody also ?
      can anyone send me sqlca.h and sqlda.h please ?

      thx a lot
        • 1. Re: osx : sqlca.h is crushed at install
          Ronald Rood
          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...

          • 2. Re: osx : sqlca.h is crushed at install

            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?


            • 3. Re: osx : sqlca.h is crushed at install
              Ok folks

              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.

              • 4. Re: osx : sqlca.h is crushed at install
                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?

                • 5. Re: osx : sqlca.h is crushed at install
                  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)
                  Paula:~/pdc oracle$

                  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 - 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

                  Paula:~/pdc oracle$

                  and I compile cleanly as follows:

                  Paula:~/pdc oracle$ cc -L$ORACLE_HOME/lib -L/usr/lib -lclntsh -o frog frog.c
                  Paula:~/pdc oracle$

                  and I run my trivial test program:

                  /Users/oracle/pdc/frog paul/paul
                  2 pap records
                  Tommy 99
                  Tap 100
                  Paula:~/pdc oracle$

                  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
                  #include <stdio.h>
                  #include <stdlib.h>
                  #include "sqlca.h"

                  #define NOT_FOUND 1403

                  main ( argc, argv )
                  int *argc;
                  char **argv;
                  Paula:~/pdc oracle$

                  • 6. Re: osx : sqlca.h is crushed at install
                    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).

                    Thanks again

                    • 7. Re: osx : sqlca.h is crushed at install
                      Hi Oscar

                      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

                      • 8. Re: osx : sqlca.h is crushed at install
                        Yes Paul,
                        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)
                        • 9. Re: osx : sqlca.h is crushed at 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
                          #include <sqlca.h>
                          #include "sqlca.h"
                          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?).
                          It worked!

                          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 agree.

                          • 10. Re: osx : sqlca.h is crushed at install
                            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?