This is a discussion on linking the C++ libs within the Informix forums, part of the Database Server Software category; --> Hi, I'm having some trouble linking the Informix C++ libraries to my own C++ code. My code includes the ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, 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. Thanks for any help, Martin |
| |||
| 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.eart hlink.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 |
| ||||
| "Martin" <imxng@bootweb.nl> writes: > 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? IMO, IBM expects you to use the OS that a particular release was ported and certified on... even for Linux. At least that's the way IBM behaved towards me when I had a support contract, a newer Red Hat distro, and a serious bug that halted development. The support dude claimed that IBM was seriously considering only supporting "Enterprise" Linux in the future. Well, I've had RHEL3 for six months now and I'm *still* waiting for a version of J/Foundation that will run on it... Now that i've had my rant, have a look at Libcpp_machine_notes_2.81.txt in the doc directory. It would appear that 2.81.UC3 was built on RHL 7.1 (a version that Red Hat "end-of-life"d some time ago). This means that the C++ libraries were built with egcs-2.95. That's the C++ compiler you should probably be using. -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B |
| Thread Tools | |
| Display Modes | |
|
|