The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
compile a c program djehresmann High Level Programming 8 02-22-2008 01:18 PM
Unable to compile the c programme in unix vasudeva UNIX for Dummies Questions & Answers 10 12-01-2006 04:58 PM
How to compile a c program by using gcc Bell High Level Programming 5 05-14-2006 08:27 PM
how to compile a program CmpKillr High Level Programming 2 04-07-2003 06:57 PM
Unable to compile ANSI compatible code on HP-UX jyotipg HP-UX 9 10-18-2001 11:02 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-20-2008
satvd satvd is offline
Registered User
  
 

Join Date: May 2008
Posts: 3
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

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 (permalink)  
Old 05-20-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,800
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0