the pro*c question

From: C H D Ng <chdng_at_news.dcs.warwick.ac.uk>
Date: Tue, 20 Jul 1993 12:05:13 GMT
Message-ID: <1993Jul20.120513.10424_at_dcs.warwick.ac.uk>


I get a embedded C program from a reference book. The program is below:

#include <stdio.h>

EXEC SQL BEGIN DECLARE SECTION;

     VARCHAR user[20];
     VARCHAR password[20];

EXEC SQL END DECLARE SECTION; EXEC SQL INCLUDE SQLCA; main()

   {
    strcpy(user.arr, "SQLDBA");
    user.len=strlen(user.arr);
    strcpy(password.arr,"SQLDBAPW");
    password.len=strlen(password.arr);
    EXEC SQL CONNECT :user IDENTIFIED BY :password;

    if (sqlca.sqlcode = 0)

      {
        EXEC SQL CREATE TABLE TEAMS (...);
        printf("The TEAMS table has been created. \n");
        EXEC SQL COMMIT WORK RELEASE;
      }

exit(0);

   }

For example, the name of this program is teams.pc

I use the pro*c compiler to compile it in the following method:

proc iname=teams.pc

to obtain the C code

then using the C compiler to compile the C code by the following method:

cc teams.c

However, I got the message like that:

Precompiling teams.pc
esuuz_at_violet> cc teams.c
ld: Undefined symbol

   _sqlcex
Compilation failed

Do you know why ??
My hardware is Unix system. the system are Oracle7, unix C compiler and Pro*C: release 1.5.6.2.1

I look forwards for some experts reply and advise!!

-- 

! Name: Ng Chi Ho, Dominic !
! Address: Engineering Department, Warwick University, Coventry !
! email address: chdng_at_dcs.warwick.ac.uk !
! esuuz_at_csv.warwick.ac.uk !
--
! Name: Ng Chi Ho, Dominic !
! Address: Engineering Department, Warwick University, Coventry !
! email address: chdng_at_dcs.warwick.ac.uk !
! esuuz_at_csv.warwick.ac.uk !
Received on Tue Jul 20 1993 - 14:05:13 CEST

Original text of this message