Home » Developer & Programmer » Precompilers, OCI & OCCI » Can't link archive or shared libraries
Can't link archive or shared libraries [message #164220] Wed, 22 March 2006 06:40 Go to next message
scubie
Messages: 5
Registered: March 2006
Junior Member
OK I am lost.

We are running HP-UX 11.23 with Oracle 9207.

Our development says the following is happening:

I can't link archive or shared libraries that include STL (standard template library) code.
If I compile and link the code without making use of an archive library step, it works.
As soon as I include the STL code within the archive or shared library, the link step fails.

The error they get is:

ld: Unsatisfied symbols:
fxFailingToLink__Fv (first referenced in main.o) (code)
*** Error exit code 1

The make file is as follows:

#--------------------------------------------------------------
# HP-UX C++ compiler
#--------------------------------------------------------------
COMPILE=/opt/aCC/bin/aCC
CCFLAGS= -AA -c -v +p +DA2.0 +DS2.0 \
-D_HPUX_SOURCE \
-D_POSIX_C_SOURCE=199506L \
-DRWSTD_MULTI_THREAD \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-D_THREAD_SAFE

#--------------------------------------------------------------
# HP-UX C++ linker
#--------------------------------------------------------------
LINK=ld
LDFLAGS= \
/opt/langtools/lib/crt0.o \
/opt/aCC/lib/cpprt0.o \
-L /opt/aCC/lib \
-v \
+vallcompatwarnings \
+pd 16M \
-lstd_v2 \
-lCsup_v2 \
-lm \
-L$(ORACLE_HOME)/lib32 \
-lclntsh

#--------------------------------------------------------------
# excutable
#--------------------------------------------------------------
exe: main.o failing.a
$(LINK) $(LDFLAGS) main.o -o tester.exe

main.o : main.cpp
$(COMPILE) $(CCFLAGS) main.cpp

failing.a : failing.cpp
$(COMPILE) $(CCFLAGS) failing.cpp
ar r failing.a failing.o
#--------------------------------------------------------------


Any ideas please?

Thanks

Carlo
Re: Can't link archive or shared libraries [message #164352 is a reply to message #164220] Thu, 23 March 2006 01:50 Go to previous message
scubie
Messages: 5
Registered: March 2006
Junior Member
Might help if I include the library in the link flags... Embarassed

Carlo
Previous Topic: where 2 get Pro*C - faq?
Next Topic: OCI non blocking??
Goto Forum:
  


Current Time: Thu Mar 28 04:06:48 CDT 2024