Re: linking the C++ libs
Posted in 2004
Topics: Installation, Setup & Upgrades
Martin wrote: > I'm having some trouble linking the Informix C++ libraries to my own C++ > code. > > My code includes the <it.h> header file and compiles ok, but whenever I try > using one of the library classes/objects, I get an 'undefined reference to' > error when linking. First I thought I wrongly linked the libraries to my .o > file, but even the examples (demo/c++) don't link correcly as they give the > exact same errors ('make curstst' for example). Is there any way of checking > if the installed libraries are working? > I installed SDK 2.81 and try compiling with g++ version 3.3.1. Which platform? Which compiler was used to build the library? If it wasn't a 3.3.x GCC (G++) compiler, you're out of luck. C compilers mix'n'match; C++ compilers do not, in general. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
"Jonathan Leffler" <jleffler@earthlink.net> schreef in bericht news:7Z0kc.13823$eZ5.12660@newsread1.news.pas.earthlink.net... > Martin wrote: > > I'm having some trouble linking the Informix C++ libraries to my own C++ > > code. > > > > My code includes the <it.h> header file and compiles ok, but whenever I try > > using one of the library classes/objects, I get an 'undefined reference to' > > error when linking. First I thought I wrongly linked the libraries to my .o > > file, but even the examples (demo/c++) don't link correcly as they give the > > exact same errors ('make curstst' for example). Is there any way of checking > > if the installed libraries are working? > > I installed SDK 2.81 and try compiling with g++ version 3.3.1. > > > Which platform? Which compiler was used to build the library? If it > wasn't a 3.3.x GCC (G++) compiler, you're out of luck. C compilers > mix'n'match; C++ compilers do not, in general. > > I'm using SuSe Linux. Well, IBM only offers precompiled C++ libraries as far as I know. When I download & install the Informix Client SDK, it installs a bunch of libraries in /opt/informix/lib/c++ which already have been compiled. Can't find any sources anywhere, so compiling the libraries myself is not on option. Why would IBM distribute C++ Informix libraries anyway, if 90% of the world is not able to use them because of the problem you describe? Or am I missing something here? Martin