Unix Technical Forum

linking the C++ libs

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 ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 09:13 PM
Martin
 
Posts: n/a
Default linking the C++ libs

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 09:15 PM
Jonathan Leffler
 
Posts: n/a
Default Re: linking the C++ libs

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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 09:15 PM
Martin
 
Posts: n/a
Default Re: linking the C++ libs


"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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 09:18 PM
Ronald Cole
 
Posts: n/a
Default Re: linking the C++ libs

"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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:29 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com