Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Gnu C-compiler on Sparc Solaris and Oracle
Karsten Weikop wrote in message <361115D0.983506A8_at_isa.dknet.dk>...
>According to Oracle, the GNU c-compiler is not supported on Sparc
>Solaris together with Oracle.
>
>My question is, if it is possible to use the GNU c-compiler together
>with PRO*c and Oracle.
>
I built some of the OCI demo apps yesterday with gnu c. (The version I had is 2.7.2.)
The makefiles and options to the compiler we're broken. I figured out what libraries needed to get linked in and included these in a makefile I wrote myself. I also included the oracle makefile defines. The apps ran fine, but I didn't stress test them or anything serious. However, I ran into a problem with OCI and multithreading, that I'm assuming is unrelated.
I don't use pro*c.
Here's the makefile that I ended up with...
ORACLE_HOME=/opt2/oracle7
include $(ORACLE_HOME)/rdbms/lib/env_rdbms.mk
ORACLE_LIB_HOME=$(ORACLE_HOME)/lib ORACLE_LDFLAGS = -L$(ORACLE_LIB_HOME) -L$(ORACLE_HOME)/rdbms/lib ORACLE_INC= -I$(ORACLE_HOME)/rdbms/public
CC = gcc
CFLAGS = -g -O $(ORACLE_INC)
CFLAGS_COMPILE_ONLY = -c
LDFLAGS = $(ORACLE_LDFLAGS)
O=o
ORACLE_LIBS = $(LIBCLIENT) $(DEVTTLIBS) $(LLIBCORE) LIBS = -lintl -lgen -lpthread -lcurses -ltermcap $(ORACLE_LIBS)
all: cdemo1 cdemo6
cdemo1: cdemo1.o
${CC} $(CFLAGS) ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
cdemo6: cdemo6.o
${CC} $(CFLAGS) ${LDFLAGS} -o $@ cdemo6.o ${LIBS}
.c.o:
${CC} -I. ${CFLAGS_COMPILE_ONLY} ${CPPFLAGS} ${CFLAGS} $<
.cc.o:
${CC} -I. ${CFLAGS_COMPILE_ONLY} ${CPPFLAGS} ${CFLAGS} $< Received on Tue Sep 29 1998 - 00:00:00 CDT