Home » Developer & Programmer » Precompilers, OCI & OCCI » PROBLEM WITH SQLCXT
PROBLEM WITH SQLCXT [message #128725] Wed, 20 July 2005 05:32 Go to next message
deepa_k
Messages: 15
Registered: June 2005
Junior Member
hi all

As i am new to pro*c, i am trying to execute a simple program.
But unable to get result.
I am working in Digital unix/Oracle8i

Code:(sample.pc)
#include <stdio.h>
#include <ctype.h>
#include <string.h>

EXEC SQL BEGIN DECLARE SECTION;
     VARCHAR uid[20];
     VARCHAR pwd[20];
EXEC SQL END DECLARE SECTION;
#include <sqlca.h>
main()
{
  printf("enter login name:");
  scanf("%s",uid);
  printf("enter password");
  scanf("%s",pwd);
  
  EXEC SQL CONNECT :uid.arr IDENTIFIED BY :pwd.arr;
}


When i compile this .pc file by giving command proc iname=sample.pc, i am getting sample.c file.

When i compile this sample.c file by giving command cc .....
i am getting error
ID:
UNRESOLVED:
SQLCXT
This error is in precompiler generated C code.

I am struck with this for last 2 days.
I tried to compile sample.c file by giving its path & headerfile path also. But no change.
when i remove that oracle connect statement, It's compiling.

Please give me a solution.
I feel its not a typical error.but i am hopeless.
expecting ur valuable soln.

regards

deepa.



Re: PROBLEM WITH SQLCXT [message #128764 is a reply to message #128725] Wed, 20 July 2005 09:03 Go to previous message
Frank Naude
Messages: 4565
Registered: April 1998
Senior Member
Try the following:

make -f $ORACLE_HOME/precomp/demo/proc/demo_proc.mk build EXE=sample OBJS=sample.o


Best regards.

Frank
Previous Topic: PRO*c + OCI
Next Topic: error "ORA-01012: not logged in" when exec sql
Goto Forum:
  


Current Time: Tue Oct 27 13:39:54 CDT 2020