This discussion is archived
2 Replies Latest reply: May 16, 2012 9:06 AM by 937763 RSS

pro c compilation issue with varchar2 using gcc on windows

902884 Newbie
Currently Being Moderated
Hi
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sqlda.h>
#include <sqlcpr.h>
#include <sql2oci.h>
#include <sqlca.h>
#include <oci.h>

#define UNAME_LEN 30
#define PWD_LEN 30

varchar username[UNAME_LEN]; 
varchar password[PWD_LEN]; 
varchar tnsname[32]; 

int main(int argc, char **argv) {
  return 0;
}
when i try compiling it with mingw using gcc on windows 7 i am getting the following error

D:\oci>gcc -o ociclient.exe -I%ORACLE_HOME%\oci\include -I%ORACLE_HOME%\precomp\public ociclient2.c %ORACLE_HOME%\bin\oci.dll
**ociclient2.c:13:1: error: unknown type name 'varchar'
ociclient2.c:14:1: error: unknown type name 'varchar'
ociclient2.c:15:1: error: unknown type name 'varchar'**

Any ideas

int main(int argc, char **argv) {
return 0;
}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points