Still unable to compile pro*c program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Still unable to compile pro*c program
# 1  
Old 05-20-2008
Still unable to compile pro*c program

I am unable to compile the programs, I am able to compile .pc to .c but later part of the compilation from .c to executalbe i am unable to do.

Here is the way i am doing

make -f $LIB_LIB/makefile.templ sample

Code:
I am getting the following errors, which environment and where to set to point compiler to sqlca.h? please help.

ucbcc -O -DNULL=0 -v   -o sample -L/opt/oracle/product/10.2.0/precomp/lib/ -L/opt/oracle/product/10.2.0/lib/ -o sample sample.c   `cat /opt/oracle/product/10.2.0/lib/sysliblist` -R/opt/oracle/product/10.2.0/lib -laio  -lposix4  -lm 
###     command line files and options (expanded):
### -xO3 -DNULL=0 -v -L/opt/oracle/product/10.2.0/precomp/lib/ -L/opt/oracle/product/10.2.0/lib/ -o sample sample.c -lkstat -lnsl -lsocket -lgen -ldl -lsched -R/opt/oracle/product/10.2.0/lib -laio -lposix4 -lm 
### ucbcc: Note: NLSPATH = /opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
/opt/SUNWspro/prod/bin/acomp -Qy -N /tmp/acomp.12653.2.ir -g "/opt/SUNWspro/prod/bin/acc -O -DNULL=0 -v -L/opt/oracle/product/10.2.0/precomp/lib/ -L/opt/oracle/product/10.2.0/lib/ -R/opt/oracle/product/10.2.0/lib  -c" -b -Xa -D__SunOS_5_10 -D__SUNPRO_C=0x570 -Dunix -Dsun -Dsparc -D__unix -D__sun -D__sparc -D__BUILTIN_VA_ARG_INCR -D__SVR4 -D__RESTRICT -D__PRAGMA_REDEFINE_EXTNAME -I/opt/SUNWspro/prod/include/cc -O3 -DNULL=0 -destination_ir=iropt -i sample.c -o /tmp/acomp.12653.1.s -r /tmp/acomp.12653.0.ir

"sample.c", line 117: warning: no explicit type given
"sample.c", line 119: warning: no explicit type given
"sample.c", line 121: warning: no explicit type given
"sample.c", line 122: warning: no explicit type given
"sample.c", line 123: warning: no explicit type given
"sample.c", line 143: cannot find include file: <sqlca.h>
"sample.c", line 170: undefined symbol: sqlca
"sample.c", line 196: undefined struct/union member: sqlcode
"sample.c", line 196: warning: left operand of "." must be struct/union object
"sample.c", line 219: undefined symbol: sqlca
"sample.c", line 248: undefined struct/union member: sqlcode
"sample.c", line 248: warning: left operand of "." must be struct/union object
"sample.c", line 249: undefined struct/union member: sqlcode
"sample.c", line 249: warning: left operand of "." must be struct/union object
"sample.c", line 264: undefined symbol: sqlca
"sample.c", line 264: undefined struct/union member: sqlcode
"sample.c", line 264: warning: left operand of "." must be struct/union object
rm /tmp/acomp.12653.1.s
rm /tmp/acomp.12653.0.ir
*** Error code 2
make: Fatal error: Command failed for target `sample'


Last edited by satvd; 05-20-2008 at 05:54 AM..
# 2  
Old 05-20-2008
This is your problem
Code:
sample.c", line 143: cannot find include file: <sqlca.h>

The code line should read
Code:
#include "sqlca.h"

and there should be an -I [/path/to/where sqlca.h is] statement in the compile command, unless you have a copy in the current directory.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Not able to compile C program on z/OS (USS)

Hi, I having an issue while compiling a C program in USS (z/OS) machine. I was able to create objest files (.o) from source (.c) files but when I try to create a binary file from the object files I am getting the below error. $ cc util.o sock.o app.o -lnsl -o ptf FSUM3067 The archive... (7 Replies)
Discussion started by: madhu84
7 Replies

2. UNIX for Dummies Questions & Answers

Unable to compile Shell Script

Hi there, I have written the shell script to illustrate arithmetic operations using case command as shown below: #!/bin/bash echo -n "Enter any two numbers :" read a read b MENU=" Select any one option 1) Addition 2) Substraction 3) Multiplication 4) Division 5) Quit" clear $x=0;... (5 Replies)
Discussion started by: grc
5 Replies

3. Programming

Not able to compile .pcc (Pro*C++) file

Hello, I use Omniworks build environment for compiling pro*c++(filename.pcc) files which would result in .filename.cc. I am not able get these files due some misplacement in environment... Could anyone explain the environment variable linked to it .. I know few like LIB_PATH,LD_LIBRARY_PATH and... (0 Replies)
Discussion started by: shafi2all
0 Replies

4. Programming

compile a c program

I am trying to compile a c program on AIX 5.3L 64-bit unix. I have used this program in the past and it works. Does anybody know what this error means? /usr/local/bin> gcc get_epoch_secs.c get_epoch_secs gcc: get_epoch_secs: No such file or directory get_epoch_secs.c: In function... (8 Replies)
Discussion started by: djehresmann
8 Replies

5. BSD

How to compile a c program in freeBSD

Hi , I have freeBSD installed. I need to compile a c program which has embedded informix sql statement in it. Can you please help me to to do the same. I need to know what I should I do to make BSD compatable to compile the c program ? Thanks in advance Jisha (3 Replies)
Discussion started by: jisha
3 Replies

6. UNIX for Dummies Questions & Answers

Unable to compile the c programme in unix

Hi, My name is vreddy and I am learning c language now and written one programme on vi editor. how do I compile the programme please give me some advice and that would be helpfull for me. thanks vre (10 Replies)
Discussion started by: vasudeva
10 Replies

7. Programming

how to compile a program statically

how can i do static compilation in cc and -lldap i have system defined and user defined header file. Can any one suggest any site where from i can get some information about static and dynamic compilation. Thankx (1 Reply)
Discussion started by: bhakti
1 Replies

8. Programming

How to compile pro*c, C programs

Hi, How to precompile the c program which has proc statements within it. If it is only c, I will use the following cmd cc filename.c -o output so please tell me what command I have to use for precompilation. I beleave that this is not an oracle or proc forum, but still I hope will... (1 Reply)
Discussion started by: sweta
1 Replies

9. Programming

How to compile a c program by using gcc

Hi all, Yeasterday I try to compile c program by using cygwin. I just find an errors the fist one is concerinig about the end of the line. To summit my Assignment which is the day after tommorow I have to compile my c program by using just gcc. If any one know what do I have to... (5 Replies)
Discussion started by: Bell
5 Replies

10. Programming

how to compile a program

how do i go about compiling a simple hello world script in mandrake linux? this is something i have had no luck in finding on the main site, please help? thank you (2 Replies)
Discussion started by: CmpKillr
2 Replies
Login or Register to Ask a Question