pro*c error sqlcex undefind

From: Sharif Joya <joya_at_MCS.COM>
Date: 19 Jan 1995 17:20:32 -0600
Message-ID: <3fms40$95v_at_Mercury.mcs.com>


Hi everybody: I wrote a small proc*c program to insert a row in table new; This is the first time I am writing pro*c prog. The way I compile:

proc iname=filename
cc filename.c

errrrrrrrrorrr:
But c compiler gives me error ld: _sqlcex undefined. Belew are the two line I see in c file.

extern sqlcex(/*_ unsigned long *, struct sqlexd *, struct sqlcxp * _*/); sqlcex(&sqlctx, &sqlstm, &sqlfpn);

Im I missing anything or may be compiling wrong. Will appreciate any help.

Thanks
joya( joya_at_mars.mcs.com)

/* sample program starts here */

#include <stdio.h>

EXEC SQL BEGIN DECLARE SECTION;

	VARCHAR 	username[20];
	VARCHAR 	password[20];
	VARCHAR 	num[28];

EXEC SQL END DECLARE SECTION; EXEC SQL INCLUDE sqlca;

main()
{
strcpy(num,"add new row");

	strcpy(username.arr, "name");    	/* copy the username */
	username.len = strlen(username.arr);
	strcpy(password.arr, "password");		/* copy the password */
	password.len = strlen(password.arr);

	EXEC SQL CONNECT :username IDENTIFIED BY :password;
	printf("\nConnected to ORACLE as user: %s\n", username.arr);
	     EXEC SQL INSERT INTO NEW VALUES(:num);
	EXEC SQL COMMIT WORK RELEASE;    /* logoff database */
	exit(0);

}

thanks joya (joya_at_mars.mcs.com)p Received on Fri Jan 20 1995 - 00:20:32 CET

Original text of this message