5 messages in com.mysql.lists.plusplusRe: MySql++ and Compiling
FromSent OnAttachments
Tomppa27 Dec 2000 05:12 
Thimble Smith27 Dec 2000 05:16 
Thimble Smith27 Dec 2000 06:26 
Tomppa27 Dec 2000 06:52 
Tomppa27 Dec 2000 08:24 
Subject:Re: MySql++ and Compiling
From:Tomppa (thom@kolumbus.fi)
Date:12/27/2000 06:52:12 AM
List:com.mysql.lists.plusplus

Thimble Smith wrote:

On Wed, Dec 27, 2000 at 03:13:07PM +0200, Tomppa wrote:

I am newbie with mysql++ and C++ and i can not even compile the example programs, my OS is Red Hat 7.

i try like this: (One example from MySql++ tutorial)

#include <iostream> #include <iomanip> #include <sqlplus.hh>

int main() { Connection con("mysql_cpp_data"); // The full format for the }

Blech. :( You might want to get a new e-mail program. ;/

and i get many rows error that 'undefined reference' -> different classes and methods.

Uh-huh. But what methods are undefined? How exactly did you run the compiler and linker? You gave some good information, but not enough.

Am i missing something or needs compiler some extra parameters.

Probably. Maybe something is broken in mysql++ or in the compiler, but probably you've just missed something simple.

Hi Tim

I put hier more details.

My compiler use options like this:

c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -O0 -g3 -Wall - c main.cpp c++ -O0 -g3 -Wall -0 mysql main.o

To me this not say much.

examples of not defined:

/usr/include/g++-3/stl_vector.h(.text+0X30):undefined reference to 'Mysqlconnection::MysqlConnection(char const *,char const *,char const *,char const *,bool)' /usr/include/g++-3/stl_vector.h(.text+0X56d):undefined reference to 'operator<<(ostream &, mysql_ColData<const_string>const &)' /usr/include/g++-3/stl_vector.h(.text+0X6e1):undefined reference to 'Mysqlconnection::MysqlConnection()'

and so on......................

I hope this help you to help me :)

I see that you are not far away from my place(Espoo,Finland)

Thomas