digitalmars.D.learn - calling C variadic arguments with no 'argc' and only variadic
- Laeeth Isharc (16/16) Mar 17 2015 So I ported the C API for MathGL to D, and it is up at
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (6/9) Mar 17 2015 Are you sure those are the right signatures? I don't think those
- Laeeth Isharc (4/14) Mar 18 2015 My mistake. Dstep got confused in the translation and wrote the
So I ported the C API for MathGL to D, and it is up at code.dlang.org (under dmathgl). MathGL is a nice plotting library. http://mathgl.sourceforge.net/doc_en/Pictures.html#Pictures Later I will work on porting the C++ interface, but so far it at least works for the simplest sample. (Not tried anything else as they are all written in C++). DMD gave me an error message for the following declarations: double mgl_rnd (...); double mgl_rnd_ (...); It says I need at least one fixed argument first. But the C headers are as they are. I could work around this by writing a C stub double mgl_rnd_(int dummy, ...) but is there any way to call these functions without this workaround?
Mar 17 2015
On 03/17/2015 06:13 PM, Laeeth Isharc wrote:DMD gave me an error message for the following declarations: double mgl_rnd (...); double mgl_rnd_ (...);Are you sure those are the right signatures? I don't think those functions take any parameters at all. I would try these: double mgl_rnd (); double mgl_rnd_ (); Ali
Mar 17 2015
On Wednesday, 18 March 2015 at 05:38:40 UTC, Ali Çehreli wrote:On 03/17/2015 06:13 PM, Laeeth Isharc wrote:My mistake. Dstep got confused in the translation and wrote the sig as ...and I was tired and didnt check. Thanks for looking into it.DMD gave me an error message for the following declarations: double mgl_rnd (...); double mgl_rnd_ (...);Are you sure those are the right signatures? I don't think those functions take any parameters at all. I would try these: double mgl_rnd (); double mgl_rnd_ (); Ali
Mar 18 2015