Pro*C Problem
Date: 17 Aug 1999 20:59:35 GMT
Message-ID: <7pcifn$5r$1_at_news.gte.com>
Hello Everyone,
I am trying to send an e-mail from a stored procedure, for that I am using DBMS_PIPE and a Pro*C Program.
The Problem is when i am trying to compile the following piece of code on Oracle 8.0.5 (On AIX 4.3.2) by using the default
make file "demo_proc.mk" in $ORACLE_HOME/precomp/demo/proc/demo_proc.mk, I am getting an error.
This is the Pro*C program :
#include <stdio.h>
EXEC SQL BEGIN DECLARE SECTION;
int status; char *retval; char *uid = "imsadm/imsadm_at_ims";EXEC SQL END DECLARE SECTION; EXEC SQL INCLUDE SQLCA;
main()
{
/* Connect to the same schema which created the pipe in the database trigger */ EXEC SQL CONNECT :uid; for (;;) { EXEC SQL EXECUTE DECLARE typ INTEGER; sta INTEGER; chr VARCHAR2(2000); BEGIN chr := ''; /* Receive the message */ sta := dbms_pipe.receive_message('emailoutputpipe'); IF sta = 0 THEN /* Unpack the message */ dbms_pipe.unpack_message(chr); END IF;
:status := sta;
:retval := chr;
END; END-EXEC; if (status == 0) system(retval); /* The system() call will execute the "mail" string which is sent over the pipe */ }
}
I used the following command to generate c-file:
proc email userid=imsadm/imsadm_at_ims sqlcheck=semantics
This command creates the .c file without any problem.
But after that, when i am executing the following command i am getting an error:
make -f demo_proc.mk email
Here is the error:
oraxlc: calling cc with arguments '-O -I. -I/u01/app/oracle/product/8.0.5/precomp/public -I/u01/app/oracle/p roduct/8.0.5/rdbms/public -I/u01/app/oracle/product/8.0.5/rdbms/demo -I/u01/app/oracle/product/8.0.5/plsql/p ublic -I/u01/app/oracle/product/8.0.5/network/public -o email -L/u01/app/oracle/product/8.0.5/precomp/lib/ - L/u01/app/oracle/product/8.0.5/lib/ email.c -o email'
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
oraxlc: cc returned exit status 1
make: 1254-004 The error code from the last command is 1.
Stop.
Does anybody out there know : why am i getting this? Is there anything wrong with the default make file?
What is the wrong for not identifying "sqlcxt"..any idea?
I will be Thankful for any kind of suggestions. Received on Tue Aug 17 1999 - 22:59:35 CEST