[ROOT] compiled TSQLServer hangs

From: Sven A. Schmidt (sven_schmidt@mac.com)
Date: Sun Oct 13 2002 - 22:19:57 MEST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm using the TSQL* classes to connect to and query a mysql database. I 
have the following code in 'test.cc':

- ------------------------------------------------------------------------
#include <TSQLServer.h>
#include <TSQLResult.h>
#include <iostream.h>

int main() {
     TSQLServer *db = TSQLServer::Connect( "mysql://localhost/mydata",
								     "user", "password" );
     TSQLResult *res = db->Query( "select * from theData" );
     TSQLRow *row;
     cout << "rows: " << res->GetRowCount() << endl;
}
- ------------------------------------------------------------------------

When I load this in the interpreter ( ".L test.cc" ) and run it by 
calling "main()", I get the expected row count.

But when I compile the file like this:
g++ -g -O -Wall -fPIC `root-config --cflags` `root-config --libs` 
`root-config --glibs` \
     -o test test.cc
and then run the resulting binary, it just sits there, trying to 
connect to the db. It never gets to the query line.

The platform is MacOSX 10.2, root version is 3.03.09, MySQL version is 
3.23.51.

What is the difference in the compiled and the interpreted version of 
the DB access?
Has anyone experienced (and solved?) the same problem?

Cheers,
Sven
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9qdVxVpUkGuwnAeURAoeZAKCvlSa13vR66YCS5mQ+HBW0cnX5SgCgtpAv
ndgia+NbVzCVYfrkVLkcrnw=
=dHEE
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET