Re: typedef deprecated - now what ?
On 30/12/2011 10:35, Stephan wrote: is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? Could someone please provide a link to the thread with the reasons for deprecating typedef? There are too many threads with the words typedef and deprecate in them for me to find it easily. Stewart.
Re: Programming on OSX
On 2011-12-31 00:50, Joel Christensen wrote: I've got an Mac with OSX. But I have a few problems with using it with D. 1. I haven't got any media programming going. Could you please elaborate. Derelict is a library that contains bindings for OpenGL, OpenAL, SDL and DevIL among others. 2. The readln (etc) isn't much good, same problem as Linux. It can only add characters and remove characters from the end. -- /Jacob Carlborg
Re: Mixing D and C - Windows
On Saturday, 31 December 2011 at 19:05:44 UTC, DNewbie wrote: C program loads D dll or D program loads C dll Is it possible? Both are possible. Here's how to create a DLL in D, usable from C: http://dlang.org/dll.html As for loading C symbols in a DLL from a D program, you must link against an import library of the DLL, and create an interface module (similar to a header file) with the C declarations. For example, if this is your C DLL: --- #include stdio.h __declspec(dllexport) void sayHello(const char* name) { printf(hello, %s!, name); } --- Then your D interface module should look like this: --- extern(C) void sayHello(const char* name); --- The import library must be in the OMF format. The easiest way to get such an import library is to use the `impllib` tool which can be downloaded from here: http://ftp.digitalmars.com/bup.zip
Re: Mixing D and C - Windows
Jakob Ovrum Wrote: As for loading C symbols in a DLL from a D program, you must link against an import library of the DLL, and create an interface module (similar to a header file) with the C declarations. Alternatively, you can load the DLL via the Windows API. http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx