5 messages in com.mysql.lists.plusplusRe: Trying to compile a file
FromSent OnAttachments
Pablo Fischer03 Nov 2002 11:59 
Daniel Löfquist03 Nov 2002 12:05 
Pablo Fischer03 Nov 2002 16:05 
Pablo Fischer03 Nov 2002 18:57 
Pablo Fischer03 Nov 2002 19:12 
Subject:Re: Trying to compile a file
From:Pablo Fischer (exil@yifan.net)
Date:11/03/2002 07:12:45 PM
List:com.mysql.lists.plusplus

I found it:

g++ -I/usr/include/mysql sqlm.cc -o polaco -lsqlplus

Thanks anyway..

Hi all;

Finally I installed it in my computer I needed to patch with 3.0 patch and 3.2 patch and now I can.

I pointed the configure prefix point /usr (./configure --prefix=/usr).

Im trying to compile this: #include <iostream> #include <iomanip> #include <sqlplus.hh>

int main() { const char *db = "database"; const char *host = "localhost";

const char *user = "testuser"; const char *passwd = "password";

// Opret instans af en Mysql Connection Connection con();

// Opret forbindelse con.connect(db, host, user, paswd);

// Luk forbindelsen con.close();

// OK afslutning return 0; }

With

g++ -I/usr/include/mysql sqlz.cc -o polak (and gcc, the same result)

The result?:

sqlz.cc: In function `int main()': sqlz.cc:16: `paswd' undeclared (first use this function) sqlz.cc:16: (Each undeclared identifier is reported only once for each function it appears in.) sqlz.cc:19: request for member `close' in `con()', which is of non-aggregate type `MysqlConnection ()()'

Whats bad in the code or in the g++ line?

Thanks.

Paul Fischer