Re: QtD 0.1 is out!

2009-02-13 Thread Eldar Insafutdinov
Mike Parker Wrote:

 Eldar Insafutdinov wrote:
  naryl Wrote:
  
  Eldar Insafutdinov Wrote:
  I'm thinking on putting only C++ part of binding to a dll, while 
  statically link D part. With Qt 4.5 out under lgpl we can make QtD under 
  BSD, so this will work.
  You mean the Revised BSD License I presume?
  
  It's a subject to discuss. I am not good at licenses.
 
 The revised (or modified) BSD is the version most commonly used today. 
 In my experience, when people say BSD License it's the one they are 
 usually referring to. This is the version of BSD used for Derelict.
 
 As for the difference, the original BSD included a clause that required 
 derived works to acknowledge the original work. The modified version has 
 no such requirement. You can read more about it on Wikipedia[1].
 
 I've looked at numerous open source projects over the years which were 
 licensed under the BSD. I can't recall the last time I saw one using the 
   original version. IMO, using the modified version is a no-brainer.
 
 [1] http://en.wikipedia.org/wiki/BSD_licenses

Okey, if it is the most suitable license, we can go with it.



Re: QtD 0.1 is out!

2009-02-13 Thread Denis Koroskin
On Thu, 12 Feb 2009 22:22:41 +0300, Eldar Insafutdinov  
e.insafutdi...@gmail.com wrote:


Can somebody help me with exporting functions from a DLL? I am defining  
functions in C++ like
extern C __declspec(dllexport) void*  
__qtd_QObject_QObject_QObject(args)
After compiling a DLL with MINGW and producing a lib file for it with  
implib I am trying to use them from D.

In D I declare them as
extern (C) void* __qtd_QObject_QObject_QObject(args);
And then compile it and link it to the .lib file made by implib for that  
DLL, but optlink complains that symbol is undefined. I tried to use that  
Cfunction from C++ and it worked. What I can do?



I believe it should be extern extern(C) ...
Otherwise you /declare/ a function with C linkage but provide no  
implementation so that's why it fails at link time.