Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> How to build shared library

How to build shared library

From: Jesse Hwee <jessehwee_at_visto.com>
Date: 29 Jul 2001 23:37:37 -0700
Message-ID: <b7a7f007.0107292237.1465c95c@posting.google.com>

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 :



ORACLE_PROC_MAKEFILE = $(ORACLE_HOME)/precomp/demo/proc/demo_proc.mk TARGET = comm.so
SOURCE = comm.pc valiate.pc lookup.pc

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US