Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> How to build shared library
Hi all,
I have about 10 .pc files which I need to compile and build a shared
library from their .o files. A main program will dynamically load any
of these routines using dlopen & dlsym. The codes are written purely
in ANSI-C.
I need to compile them on HP-UX for development and then move to Sun Solaris for production. I am trying to create a makefile which can be use for both platform.
I have created a makefile for building the shared library :
PROC_ENV_FLAGS = sqlcheck=full userid=$(USERID)
CC_ENV_FLAGS =
$(TARGET): $(SOURCE) $(SOURCE:.pc=.c) $(SOURCE:.pc=.o)
$(LD) -o $(TARGET) -L$(ORACLE_HOME)/lib $(PROLDLIBS)
$(LIBEXTP) \
$(SOURCE:.pc=.o)
include $(ORACLE_PROC_MAKEFILE)
USERID=bbdev/bbdev
PROCFLAGS= ireclen=255 lines=yes $(PROC_ENV_FLAGS) \
include=$(ORACLE_HOME)/precomp/lib
PROFLAGS=$(PROCFLAGS) CFLAGS=-g $(CC_ENV_FLAGS) $(INCLUDE)
when I do
$make -f comm.mk
I got this:
ld: Unsatisfied symbols:
$global$ (data) (probably missing /usr/ccs/lib/crt0.o)
*** Error exit code 1
Stop.
Not sure what does this mean but there is a file crt0.o in /usr/ccs/lib.
I would very very much appreciated if anyone can give any advice on this matter.
Thank you. Received on Mon Jul 30 2001 - 01:37:37 CDT
![]() |
![]() |