Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Makefile Problems

Status
Not open for further replies.

pferdle

Programmer
Joined
Jan 8, 2007
Messages
1
Location
DE
Hello,

i would like to link different shared libraries (.so und .a) together with a new library. Than to use this library with an executable program (.exe).
Everything works fine by linking but when I goint to start the exe file i got following error:

rtld: 0712-001 Symbol X509_check_issued was referenced
from module ../lib/mylib.so(), but a runtime definition
of the symbol was not found.

I try the same on SuSE Linux and i works fine. Also I tried a lot of different compiler options. In the moment my makefiles look like this:

for the shared Objekt (libmylib.so):
AR = /usr/bin/ar
CC = /usr/vacpp/bin/cc
CXX = /usr/vacpp/bin/xlC
OUT = libssf.so
CDEBUG = -qlanglvl = noansifor
DEFINES = -DBITS32 -D_CL_UNIX
CXXFLAGS = -O -Q

LDFLAGS = -bM:SRE -G
INCLUDES = -I. -I../include -I/extern1/include -I/extern2/include

LIBS = -L ../lib -lteil1 -lteil2 -L ../extern1/lib -lextern1 -L ../extern2/lib -lextern2 -lm

ifeq "$(ISEFENCE)" "1"
INCLUDES += -I/usr/local/include
endif

ifeq "$(ISEFENCE)" "1"
LIBS += -L /usr/lib -lefence
endif

OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))

%.o : %.cpp
$(CXX) -c $(CXXFLAGS) $(INCLUDES) $(DEFINES) $<

$(OUT): $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $? $(LIBS)

all: $(OUT)

clean:
rm -f $(OUT) *.o


for die exe file:
INSTALL = /usr/bin/install
AR = /opt/freeware/GNUPro/bin/ar
CC = /usr/vacpp/bin/cc
CXX = /usr/vacpp/bin/xlC

CDEBUG = -O
DEFINES = -DBITS32 -D_CL_UNIX
CXXFLAGS = -O -Q
LDFLAGS = -brtl -lC

ifeq "$(ISTHREAD)" "1"
CXXFLAGS += -qthreaded
LDFLAGS += -L/usr/lib/threads -lpthreads -qthreaded
endif

INCLUDES = -I. -I../mylib

LIBS = -L ../mylib -lmylib -lm

OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
OUT = mytest

%.o : %.cpp
$(CXX) -c $(CXXFLAGS) $(INCLUDES) $(DEFINES) $<

$(OUT): $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $? $(LIBS)

all: $(OUT)

clean:
rm -f $(OUT) *.o

LIBPATH is set. For any help I would really happy.
Thank you.

Pferdle
 
Status
Not open for further replies.

Similar threads

  • Locked
  • Question Question
Replies
2
Views
293
Replies
5
Views
475
Replies
3
Views
401
Replies
3
Views
215

Part and Inventory Search

Sponsor

Back
Top