Mail Archives: djgpp/2002/03/27/10:45:53
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 -