Re: Libraries to link ( Pro*C executable with SQL*Net2.0 )
Date: 1995/07/14
Message-ID: <peters-140795072535_at_dlambert.mitre.org>#1/1
In article <3u27vd$8f9_at_giga.bga.com>, statham_at_bga.com (Perry Statham) wrote:
> In article <AAQGb0mqX3_at_geol.spb.su>, ant_at_geol.spb.su says...
> >
> >Hi, world !
> >
> >Is there anybody able to give me a clear sense about Oracle makefiles for
> >Pro*C programs ? What libraries are needed for Pro*C executable for being
able
> >to connect over SQL*Net 2.1 ? Why have <proc.mk> makefile got "-lsqlnet
-lora"
> >twice ?
>
> Good luck! It is a real bitch trying to figure these things out.
>
> >
> >As far as I understand, the people of Oracle doesn't like
> >3GL programming at all, :-(. I've got now 7.1.3 - the third release since
> >the first 6.0.36 I've been dealing with - and all I could see is the same
> >UGLY, WITHOUT ANY RESPECT TO CUSTOMERS makefile in proc/demo directory
> >( on Unix box ). I understand that programming with GUI tools is very
> >popular - but there are a lot of things they are unable to implement so
> >I need 3GL.
> >
> >Is it so hard to give programmers clear ideas about the libraries they need
> >to link ? Two years ago I considered Unix and all stuff concerning it VERY
> >COMPLICATED by nature ( looking at 6.x.x release of Oracle ) - but now
> >I realize that it is not the feature of Unix - it's the feature of people
> >writing Unix programs. I'm very sorry about this.
>
> Your right!
>
> >
> >That's why the market is going to Microsoft monopoly,
> >there is lot of pretty buttons there without makefiles and scripts ...
>
> If anyone has any replies to this, I would like to here them. As far as I am
> concerned, the Makefiles that come with the Oracle Precompilers are the worst
> in the Unix world. I absolutely DREAD porting our app to a new version or
> Oracle because of this.
>
> It would be really nice if Oracle could just tell us which libraries to link
> against for the different options we need (ie: sql*net, pl/sql, etc...)
Folks-
I know the Oracle makefiles are not much fun, and ugly too.
I use the following distilled version for Oracle 7.0/7.1 running on SunOS,
HPUX,
and Solaris. Your milage may vary on other systems. Some items may need to
be
listed twice because most linkers make only a single pass through
each library. Normally libraries should be arranged in calling sequence.
If
a library further down the list (B) calls a function in an earlier library
(A),
then library (A) may have to be listed again after (B) for the linker to
find the function.
ORALIBS= \
-L$(ORACLE_HOME)/lib \
$(ORACLE_HOME)/lib/libsql.a \
$(ORACLE_HOME)/lib/osntab.o \
-lsqlnet \
-lora \
$(ORACLE_HOME)/lib/libpls.a \
-lsqlnet \ -lnlsrtl \ -lcv6 \ -lcore \ -lnlsrtl \ -lcv6 \ -lcore \
`cat $(ORACLE_HOME)/rdbms/lib/sysliblist`
.pc.c:
_at_echo Running Oracle Preprocessor on $*.pc ...
$(PROC) $(PROFLAGS) iname=$*.pc
myprog: myprog.o $(MYOBJS) $(MYINCLUDES)
_at_echo building $@ executable ...
$(CC) $(LDFLAGS) -o $_at_ $@.o $(MYOBJS) $(ORALIBS) $(SYSTEMLIBS)
-- Peter Sylvester MITRE Corp. Bedford, MA (peters_at_mitre.org)Received on Fri Jul 14 1995 - 00:00:00 CEST