www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/27/10:45:53

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
To: djgpp AT delorie DOT com
Date: Wed, 27 Mar 2002 07:42:55 -0800
From: "ray xu" <rayxu AT angelfire DOT com>
Message-ID: <LNAOHPDEFJMPDCAA@angelfire.com>
Mime-Version: 1.0
X-Sent-Mail: off
X-Mailer: MailCity Service
Subject: oracle oci and pro*c question-thanks
X-Sender-Ip: 209.197.173.76
Organization: Angelfire (http://email.angelfire.mailcity.lycos.com:80)
Reply-To: djgpp AT delorie DOT com

Hi,

When I tried to compile either pro*c or OCI program, I got error msg " undefine reference to ....". I think this is a linker problem. Do you support pro*c and OCI? Please help me out.


the command line is as follows

gxx -o c:\_atest\test_OCI.exe -Ic:\oracle_pro\ora81\oci\include c:\oci.lib c:\_atest\test_OCI.cpp 

my code:

++++++++++++++
#include <stdio.h>
#include <iostream.h>
#include <stdlib.h>
#include <string.h>
#include <oci.h>

static OCIEnv           *p_env;
static OCIError         *p_err;
static OCISvcCtx        *p_svc;
static OCIStmt          *p_sql;
static OCIStmt          *p_sql_1;
static OCIStmt          *p_sql_2;
static OCIDefine        *p_dfn    = (OCIDefine *) 0;
static OCIBind          *p_bnd    = (OCIBind *) 0;

int main()
{
	int a;
	int             p_bvi;
    char            p_sli[20];
	char            p_sli_1[20];
	char            p_sli_2[6];
	char            p_string[20];
    int             rc;
    char            errbuf[100];
    int             errcode;

    rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0,  /* Initialize OCI */
           (dvoid * (*)(dvoid *, size_t)) 0,
           (dvoid * (*)(dvoid *, dvoid *, size_t))0,
           (void (*)(dvoid *, dvoid *)) 0 );
	
  
	//cout<<"HI";
	cin >>a;
	return 0;
+++++++++++++++++++++++++++

thanks for your help in advance


See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019