• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Oracle and Objective C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Oracle and Objective C++


  • Subject: Oracle and Objective C++
  • From: Randy Bradley <email@hidden>
  • Date: Wed, 03 Sep 2008 11:16:14 -0500
  • Thread-topic: Oracle and Objective C++

    I'm having difficulty importing data from an Oracle database into a
Cocoa application.
    I've installed the Oracle client and OCCI examples.  The example
occidml.cpp seemed to make and run just fine from the command line.
    Now, I would like to get some data from Oracle into my Cocoa application
but I'm stuck.  Since the Oracle header files are for C++ programs I thought
an objective C++ solution would be the easiest.

    With obvious credit due to Oracle engineers, my header file starts off
like:

#import <Cocoa/Cocoa.h>
#include <iostream>
#include <occi.h>

using namespace oracle::occi;
using namespace std;

class occiCon {
  private:

  Environment *env;
  Connection *conn;
  Statement *stmt;
  public:

  occiCon (string user, string passwd, string db){
    env = Environment::createEnvironment (Environment::DEFAULT);
    conn = env->createConnection (user, passwd, db);
    }

~occiCon () {
    env->terminateConnection (conn);
    Environment::terminateEnvironment (env);
    }


But I get the following errors when I try to compile it.

Line Location occiAQ.h:280: error:
'oracle::occi::aq::Subscription::Protocol' has a previous declaration here
Line Location occiAQ.h:280: error:
'oracle::occi::aq::Subscription::Protocol' has a previous declaration here
Line Location occiAQ.h:320: error:
'oracle::occi::aq::Subscription::Protocol' referred to as 'struct'
Line Location occiAQ.h:321: error:
'oracle::occi::aq::Subscription::Protocol' referred to as 'struct'

Looking at Oracle's header file: occiAQ.h in the area of line 280:



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Font Color In CTLineDraw?
  • Next by Date: Re: Changing the default audio output hardware
  • Previous by thread: Re: Changing the default audio output hardware
  • Next by thread: Re: Oracle and Objective C++
  • Index(es):
    • Date
    • Thread