Operating System - HP-UX
1748051 Members
4695 Online
108758 Solutions
New Discussion юеВ

Re: Pro*C Compilation/Linking Problem

 
A Y Krishna
New Member

Pro*C Compilation/Linking Problem

I have precompiled a Pro*c program (abc.pc) like this

node1> proc abc.pc

there were no errors

then I compiled it like

node1> cc abc.c

then I get the following error

Id: Unsatisfied Symbol "sqlcxt" in file abc.o
1 errors.

I am new to this, can anyone please help.

Thanks.
11 REPLIES 11
Sanjay Kumar Suri
Honored Contributor

Re: Pro*C Compilation/Linking Problem

Check this links:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=64515

http://www.orafaq.net/usenet/comp.databases.oracle.server/2000/06/13/0009.htm

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
A Y Krishna
New Member

Re: Pro*C Compilation/Linking Problem

Thanks Sanjay.

But it didn't helped me (I think due to my limited knowledge). Problem is I am not having any makefile supplied by Oracle !! I don't find the demo directory too !!

I am using Oracle 10g on HP UX 11i.
Indira Aramandla
Honored Contributor

Re: Pro*C Compilation/Linking Problem

Hi krishan,

According to Oracle supported proc compilers one has to use:

HP ANSI C B.11.11.08+ & HP aC++ A.03.50+
HP92453-01 A.11.01.21 HP C (Bundled) Compiler
HP aC++ B3910B A.03.37
HP aC++ B3910B A.03.30 Language Support Library

Error ├в HP-UX Oracle10g ld Unsatisfied symbol├в may be solved by installing a certified compiler.

It is recommended to use the Oracle provided make file demo_proc.mk to compile/ link your programs. The make file is shipped in $ORACLE_HOME/precomp/demo/proc directory and can be used as follows.

make -f demo_proc.mk build EXE=program_name OBJS=program_name.o

example : If test.pc is the program name, then the make file can be used as :

make -f demo_proc.mk build EXE=test OBJS=test.o

If you have multiple modules accociated with your Pro*c application, then the make file can be used as :

make -f demo_proc.mk build EXE=application_name OBJS="mod1.o mod2.o mod3.o

So you may have to purshase a lisence for the new compiler and test to see if the problem is solved.


Indi
Never give up, Keep Trying
A Y Krishna
New Member

Re: Pro*C Compilation/Linking Problem

Thanks Indira.

I don't know which compiler is bundled with this. So, you see it as license problem !! OK, I will check this out.

Coming to the makefile, thanks again for your explanation. In my server I don't see a demo directory !!

I see two makefiles, /u01/oracle/precomp/lib/ins_precomp.mk and
/u01/oracle/precomp/lib/env_precomp.mk
are these of any help?

Apart from license can there be any other turnaround :(
Indira Aramandla
Honored Contributor

Re: Pro*C Compilation/Linking Problem

Hi Krishna,

You will require to add demo_proc.mk to an existing 0g installation to enable some Pro*C compilations.

There is a companion CD along with the 10G database. The component for the PRO*C compilers is there in that CD. Install from it.

Indira A
Never give up, Keep Trying
A Y Krishna
New Member

Re: Pro*C Compilation/Linking Problem

WOW !! this sounds promising. I will come back after installing that.

Thanks.
Yogeeraj_1
Honored Contributor

Re: Pro*C Compilation/Linking Problem

hi,

after doing what Indira has suggested above, you may try to included the following sample makefile in the precompiler directory and use the symbolic in there to link with:

e.g.
=============================================
$(TARGET): $(SOURCE) $(SOURCE:.pc=.c) $(SOURCE:.pc=.o)
$(CC) $(LDFLAGS) -t -o $(TARGET) \
$(SOURCE:.pc=.o) -L$(ORACLE_HOME)/lib $(PROLDLIBS)

include $(ORACLE_PROC_MAKEFILE)

PROCFLAGS= ireclen=255 lines=yes $(PROC_ENV_FLAGS) \
include=$(ORACLE_HOME)/proc/lib
PROFLAGS=$(PROCFLAGS)

CFLAGS=-I. -g $(CC_ENV_FLAGS)
=============================================
where:
TARGET = name of program you want to create
SOURCE = list of .pc files you need to precompile/compile
PROC_ENV_FLAGS = any settings you want to override at make time for ProC
CC_ENV_FLAGS = any setting you want to override at make time for CC

then,
you should:
export ORACLE_PROC_MAKEFILE=$ORACLE_HOME/precomp/demo/proc/demo_proc.mk

hope this helps too!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
A Y Krishna
New Member

Re: Pro*C Compilation/Linking Problem

finally I could do it.

the sqlcxt symbol is found in libsqlplus.a, i have included this file in the linker path as

cc abc.c -L $ORACLE_HOME/lib32 -l sqlplus



Once again, thanks everyone.
RaviKumar_8
New Member

Re: Pro*C Compilation/Linking Problem

Hi,
This is RaviKumar.We are using the same OS environment(HP-UX 11i and Oracle 10g)I have faced the same problem.In our Oracle Server there is no demo_proc.mk.If u don't mind can u please send this file if u have
please contact the following mail ID.

ravi_mca80@yahoo.co.in
keyurg@gmail.com

If u send this it will be helpful for us.


Thanks,
Best Regards,
RaviKumar.T