Re: [ OT ] C linkage

From: Chun Wah (egg_hk_at_yahoo.com)
Date: 04/05/04


Date: Tue, 06 Apr 2004 01:24:51 +0800

Chris ( Val ) wrote:
> "Chun Wah" <egg_hk@yahoo.com> wrote in message news:40715fa5$1_1@rain.i-cable.com...
> | I am not sure my problem is relating to compiler or language, sorry if
> | its off topic.
> |
> | I am writing a C++ interface to MySQL, using MySQL's library ( in C ).
> | When I tried to call functions declared in MySQL's header file
> | (mysql.h), I got a compile error said they are undefined references. How
> | can I access to those declaration and functions ?
>
> Sorry, but this is really off topic in this group.
> Have you checked the documentation here:
> http://www.mysql.com/doc/en/Cplusplus.html
>
> You might just need to add the libs to your project.
>
> Additionally, the following is just a solitary header, that
> can connect to different databases(including MySQL) - I use
> it to connect directly to Oracle, and it works very well.
> https://sourceforge.net/projects/otl/
>
> It might make your life easier than the MySQL API.
>
> Sorry I can't be of more help.
>
> Cheers.
> Chris Val
>
>
I found out that was a linking error.

Oh... I didnt know there is a C++ API for MySQL. I was following
DuBois's book which introduced C API only.

Thanks for the info.