demo/c++ link failure
Posted in 2022
Stephane G. got linker errors on the libifc++.a symbols building the C++ demos on HP-UX with gcc. Franck Thomas suggested LIBPATH and LD_LIBRARY_PATH. Andreas Legner doubted Informix 14.10 was built for PA-RISC. Stephane said the SDK was really 3.70 for PA-RISC, renamed, and the library paths did not help. Unresolved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Internationalization & Character Sets
Hi All, I am working on HP-UX 9000/800 platform. I am trying to compile the demo source code provided with the Informix 14.10 client. (informixConnect_1410/demo/c++/) I modified the make file in order to use gcc and c++ compilers rather than cc and aCC. Unfortunately, any demo program ends with a linking error. Is someone have an idea why the linker doesn't find the symbol embedded in libifc++.a library? Many thanks for any help by advance. For instance: > make tabcnt > /gccinstall/gcc/local/bin/c++ -g -Wall -Wextra -pthread -O0 -isystem/gccinstall/gcc/local/include -ext -D__STDCPP__ -D_PROTOTYPES -DMITRACE_OFF -DIT_HAS_DISTINCT_LONG_DOUBLE -DIT_COMPILER_HAS_LONG_LONG -I/informixConnect_1410/inc -I/informixConnect_1410/incl/public -I/informixConnect_1410/incl/c++ -I/informixConnect_1410/incl/dmi -I/informixConnect_1410/incl/esql -c tabcnt.cpp > /gccinstall/local/bin/c++ -o tabcnt tabcnt.o -L/informixConnect_1410/lib/c++ -lifc++ -L/informixConnect_1410/lib/dmi -lifdmi -L/informixConnect_1410/lib/esql -L/informixConnect_1410/lib -lifsql -lifasf -lifgen -lifos -lifgls -lifglx /informixConnect_1410/lib/esql/checkapi.o -lm -lV3 -lcl -lsec -lnsl_s -lc -ldld /usr/ccs/bin/ld: Unsatisfied symbols: ITQuery::ExecOneRow(ITString const&, ITEssential**)(first referenced in tabcnt.o) (code) ITQuery::~ITQuery()(first referenced in tabcnt.o) (code) ITConnection::~ITConnection()(first referenced in tabcnt.o) (code) ITQuery::ITQuery(ITConnection const&)(first referenced in tabcnt.o) (code) ITConnection::Open() (first referenced in tabcnt.o) (code) ITString::~ITString()(first referenced in tabcnt.o) (code) ITConnection::ITConnection()(first referenced in tabcnt.o) (code) ITString::ITString(char const*)(first referenced in tabcnt.o) (code) collect2: ld returned 1 exit status *** Error exit code 1 My makefile is now like this: #Makefile related... CPPIFDIR = $(INFORMIXDIR) RANLIB = echo RM = rm -f #Compiler and linker related... GCC_DIR=${GCC_HOME} CC = $(GCC_DIR)/bin/c++ CCHOME = $(GCC_DIR) CCPP = $(GCC_DIR)/bin/c++ CCPLUS = $(CCPP) $(HEADEROPTS) CCPPFLAGS = -g -Wall -Wextra -pthread -O0 -isystem$(GCC_DIR)/include -ext $(CCDEFS) CCDEFS = -D__STDCPP__ -D_PROTOTYPES \\ -DMITRACE_OFF -DIT_HAS_DISTINCT_LONG_DOUBLE \\ -DIT_COMPILER_HAS_LONG_LONG ESQL = $(INFORMIXDIR)/bin/esql CCPLINK = $(CCPLUS) #Includes... INCL_ESQL = -I$(INFORMIXDIR)/incl/esql INCL_LIBMI = -I$(INFORMIXDIR)/incl/dmi INCL_CPPIF = -I$(INFORMIXDIR)/incl/c++ INCL = -I$(INFORMIXDIR)/incl -I$(INFORMIXDIR)/incl/public \\ $(INCL_CPPIF) $(INCL_LIBMI) $(INCL_ESQL) #Libraries... LIBS_SYSTEM = -lm -lV3 -lcl -lsec -lnsl_s -lc -ldld LIBS_ESQL = -L$(INFORMIXDIR)/lib/esql -L$(INFORMIXDIR)/lib -lifsql -lifasf -lifgen -lifos -lifgls -lifglx $(INFORMIXDIR)/lib/esql/checkapi.o LIBS_LIBMI = -L$(INFORMIXDIR)/lib/dmi -lifdmi LIBS_CPPIF = -L$(INFORMIXDIR)/lib/c++ -lifc++ LIBS = $(LIBS_CPPIF) $(LIBS_LIBMI) $(LIBS_ESQL) $(LIBS_SYSTEM) ------------------------------ Stephane GONZALEz ------------------------------ #Informix
Hi Stephane, Have you thought about setting the environment variable LIBPATH or LD_LIBRARY_PATH before running the make command? LIBPATH or LD_LIBRARY_PATH tells the make command which directories to search for dynamic link libraries. In your LIBPATH or LD_LIBRARY_PATH, you must add the Informix dynamic libraries directories (as $INFORMIXDIR/lib, $INFORMIXDIR/lib/esql and $INFORMIXDIR/lib/tools) and all the Unix libraries directories (as /lib, /usr/lib ...). Regards, -- Franck Thomas ConsultiX franck.thomas@consult-ix.fr http://www.consult-ix.fr Téléphone : 33 (0) 1 39 12 18 00 Mobile : 33 (0) 6 78 81 09 33 Fax : 33 (0) 1 39 12 18 18 Le 12/10/2022 à 22:54, Stephane GONZALEz via IBM Community a écrit :
Are we talking about this: " The HP 9000 800 Nova servers were second-generation 32-bit HP PA-RISC servers from the early 1990s and based on PA-7000 and PA-7100 processors. " ? And in relation to Informix version 14.10 (or corresponding client sdk 4.50)? I don't know that either server version 14.10 or client version 4.50 had been built and provided for HP-UX on PA-RISC (rather than Itanium), so you might simply be looking at a software compatibility problem. I don't even recall the last version that had been provided for HP-UX on PA-RISC. Let's hope I'm on a totally wrong track here ;-) ------------------------------ Andreas Legner ------------------------------
Hi, Yes, I am talking about this kind of computer. (We are on the cutting edge of technology :)) So, actually the version of the sdk is 3.7 0 for HPUX PA-RISK. (But it has been renamed by a teammate informixConnect_1410) However, the link still does not work . I also tried to add the libraries path in LD_LIBRARY_PATH and LIBPATH as suggested by ------------------------------ Stephane GONZALEZ ------------------------------
Related threads
- Answer time failure in Select.
- Help w/ algoritm to order table
- how to divide two numbers in a select ?