My ignorance, or a bug - help please

mta`chrono chrono at mta-international.net
Fri Oct 7 02:49:50 PDT 2011


-------------- mysql.d ----------------
extern (C):
struct MYSQL{}
MYSQL* mysql_init(MYSQL* mysql);


-------------- main.d -----------------
import mysql;

struct Connection
{
   MYSQL _mysql;

   ~this()
   {
   }

   this(int dummy = 0)
   {
      mysql_init(&_mysql);
   }
}

void main()
{
    Connection con1;
    Connection *con2 = new Connection(123);

}


-------------------------------------

dmd main.d mysql.d -L-lmysqlclient


works with DMD64 D Compiler v2.056


More information about the Digitalmars-d mailing list