Pro*C compiler error - Solaris 6 using gcc compiler
<[email protected]> Mon, 17 Feb 2003 00:47:52 -0800 (PST)
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-876941-2003.02.17-08.46.59--gcdod-oracle#[email protected]> |
Hi,
I am getting the error when I try to compile Pro*C program. Progam is
listed below. I tried by copying the env_precomp.mk file in the
current working
directory. Still not working...
It is on Solaris 6 and ORACLE 8.1.6
#include <stdio.h>
#include <sqlca.h>
void sqlerror();
EXEC SQL BEGIN DECLARE SECTION;
char *connstr = "system/manager";
char db_ename[20];
EXEC SQL END DECLARE SECTION;
void main() {
EXEC SQL WHENEVER SQLERROR DO sqlerror();
EXEC SQL WHENEVER SQLWARNING CONTINUE;
EXEC SQL CONNECT :connstr;
if (sqlca.sqlcode != 0) {
printf("ERROR: Unable to login to Oracle\n%.*s",
sqlca.sqlerrm.sqlerrml, sqlca.sqlerrm.sqlerrmc);
}
EXEC SQL WHENEVER NOTFOUND GOTO notfound;
EXEC SQL SELECT * from dba_users;
found:
printf("CONNECTED \n");
return;
notfound:
printf("NOT CONNECTED \n");
return;
}
void sqlerror() {
printf("Stop Error:\t%25i\n", sqlca.sqlcode);
return;
}
Error is
make -f demo_proc.mk build EXE=sample1 OBJS=sample1
/usr/ccs/bin/make -
f /oracle/product/8.1.6/precomp/demo/proc/demo_proc.mk OBJS=sample1.o
EXE=sample1 build
cc -xO2 -Xa -xstrconst -xF -mr -xarch=v8 -
xcache=16/32/1:1024/64/1 -xchip=ultra -D_REENTRANT -K PIC
-DPRECOMP -I. -I/oracle/product/8.1.6/precomp/public -
I/oracle/product/8.1.6/rdbms/public
-I/oracle/product/8.1.6/rdbms/demo -
I/oracle/product/8.1.6/plsql/public -
I/oracle/product/8.1.6/network/public
-DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -c sample1.c
cc: PIC: No such file or directory
cc: unrecognized option `-Xa'
cc: unrecognized option `-K'
cc: language chip=ultra not recognized
*** Error code 1
make: Fatal error: Command failed for target `sample1.o'
Current working directory /oracle/product/8.1.6/precomp/demo/proc
*** Error code 1
make: Fatal error: Command failed for target `sample1'
Please anyone help me ...
Thanks in advance.
Amrutha
---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to [email protected].