2 Replies Latest reply: May 16, 2012 11:06 AM by 937763 RSS

    pro c compilation issue with varchar2 using gcc on windows

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