Re: Some weird crashes

2011-03-08 Thread simendsjo
On 08.03.2011 01:32, Andrej Mitrovic wrote: Sorry for not seeing this sooner. I think you might have set the wrong calling convention in the translated header file. See my answer on SO. I hope it works for you now. Thanks. Just to get the solution here too: * Use the vs2005 library (to get

Re: Some weird crashes

2011-03-08 Thread Bekenn
On 3/8/2011 12:57 PM, simendsjo wrote: One more thing.. Function pointers in structs.. Should they use extern(Windows) too? Yes.

Re: Some weird crashes

2011-03-05 Thread simendsjo
On 28.02.2011 18:52, simendsjo wrote: I'm trying to wrap the newest mysql c connector, but I get some weird bugs. I don't know any assembly, so I don't even know if I've included enough info.. I hope this is a small enough test case so someone can understand the issue. I've used implib on the

Re: Some weird crashes

2011-03-03 Thread simendsjo
Thanks! I couldn't find it on the web page. coffimplib is missing to option to prepend _ to the types as implib does with /system. Any way around this (without changing all my code)?

Re: Some weird crashes

2011-03-03 Thread simendsjo
On 02.03.2011 18:24, Denis Koroskin wrote: On Tue, 01 Mar 2011 23:01:21 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 20:24, Denis Koroskin wrote: On Mon, 28 Feb 2011 22:04:44 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 18:52, simendsjo wrote: //

Re: Some weird crashes

2011-03-02 Thread Denis Koroskin
On Tue, 01 Mar 2011 23:01:21 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 20:24, Denis Koroskin wrote: On Mon, 28 Feb 2011 22:04:44 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 18:52, simendsjo wrote: // ERROR auto res = mysql_library_init(0, null,

Re: Some weird crashes

2011-03-02 Thread simendsjo
On 02.03.2011 18:24, Denis Koroskin wrote: On Tue, 01 Mar 2011 23:01:21 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 20:24, Denis Koroskin wrote: On Mon, 28 Feb 2011 22:04:44 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 18:52, simendsjo wrote: //

Re: Some weird crashes

2011-03-02 Thread Bekenn
On 3/2/11 10:52 AM, simendsjo wrote: I couldn't find a free download for coff2omf, that's why I don't use the supplied .lib. You can use coffimplib: ftp://ftp.digitalmars.com/coffimplib.zip

Re: Some weird crashes

2011-03-01 Thread simendsjo
On 28.02.2011 20:24, Denis Koroskin wrote: On Mon, 28 Feb 2011 22:04:44 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 18:52, simendsjo wrote: // ERROR auto res = mysql_library_init(0, null, null); auto cn = mysql_init(null); auto oldcn = cn; writeln(mysql_errno(cn));

Some weird crashes

2011-02-28 Thread simendsjo
I'm trying to wrap the newest mysql c connector, but I get some weird bugs. I don't know any assembly, so I don't even know if I've included enough info.. I hope this is a small enough test case so someone can understand the issue. I've used implib on the included dll and rdmd and dmd 2.051 to

Re: Some weird crashes

2011-02-28 Thread simendsjo
On 28.02.2011 18:52, simendsjo wrote: // ERROR auto res = mysql_library_init(0, null, null); auto cn = mysql_init(null); auto oldcn = cn; writeln(mysql_errno(cn)); assert(cn == oldcn); // when the last assert is active, the above line changes cn and thus fails. auto err = mysql_errno(cn);

Re: Some weird crashes

2011-02-28 Thread Denis Koroskin
On Mon, 28 Feb 2011 22:04:44 +0300, simendsjo simen.end...@pandavre.com wrote: On 28.02.2011 18:52, simendsjo wrote: // ERROR auto res = mysql_library_init(0, null, null); auto cn = mysql_init(null); auto oldcn = cn; writeln(mysql_errno(cn)); assert(cn == oldcn); // when the last assert

Re: Some weird crashes

2011-02-28 Thread simendsjo
On 28.02.2011 20:24, Denis Koroskin wrote: I think you have a bug at line 42. On a serious note, it might have helped if you'd attached source code, or at least binaries. The file was too large to be attached. Here's a link to a public hosting service: http://share1t.com/4xgt2l. Everything

Re: Some weird crashes

2011-02-28 Thread bearophile
simendsjo: Not sure what line you are referring to though. http://en.wikipedia.org/wiki/Answer_to_Life,_the_Universe,_and_Everything#The_number_42 Bye, bearophile