Duh, stupid me. I'm using MSVC on Windows. DBI just has some database wrappers. Since it doesn't do anything unless one of its functions are implicitly called I can't see how the placing should matter. The only relevant class functions are:
Code:
DBI::DBI()
{
//mysql_library_init();
if( !mysql_init(&mysql) ) this->fail( FAILED_ON_INIT );
if( !mysql_real_connect( &mysql, "localhost", NULL, NULL, "one", 0, NULL, 0 ) )
this->fail( FAILED_ON_CONNECT );
}
DBI::~DBI()
{
mysql_close(&mysql);
}
I've managed to do essentially the same thing with another class too though, so I'm guessing it has something to do with c++ perhaps?