Jump to page: 1 2
Thread overview
Re: QtD 0.1 is out!
Feb 10, 2009
Eldar Insafutdinov
Feb 10, 2009
Bill Baxter
Feb 10, 2009
Eldar Insafutdinov
Feb 10, 2009
Denis Koroskin
Feb 11, 2009
Eldar Insafutdinov
Feb 11, 2009
Bill Baxter
Feb 11, 2009
Eldar Insafutdinov
Feb 12, 2009
John Reimer
Feb 12, 2009
John Reimer
Feb 12, 2009
Don
Feb 12, 2009
Eldar Insafutdinov
Feb 12, 2009
Don
Feb 12, 2009
naryl
Feb 12, 2009
naryl
Feb 12, 2009
Don
Feb 12, 2009
Nick Sabalausky
Feb 12, 2009
Arnold S.
LGPL Re: QtD 0.1 is out!
Feb 17, 2009
renoX
Feb 17, 2009
Daniel de Kok
February 10, 2009
ideage Wrote:

> Great stuff!
> 
> Expect window's version!
> 
> 
So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
February 10, 2009
On Wed, Feb 11, 2009 at 6:59 AM, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
> ideage Wrote:
>
>> Great stuff!
>>
>> Expect window's version!
>>
>>
> So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.


My usual approach is to use mingw to build a dll out of the needed functionality.  If you can make the C++ part a DLL then a D program can use it just fine.

--bb
February 10, 2009
Bill Baxter Wrote:

> On Wed, Feb 11, 2009 at 6:59 AM, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
> > ideage Wrote:
> >
> >> Great stuff!
> >>
> >> Expect window's version!
> >>
> >>
> > So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
> 
> 
> My usual approach is to use mingw to build a dll out of the needed functionality.  If you can make the C++ part a DLL then a D program can use it just fine.
> 
> --bb

Thanks, but could you please clarify something for me: as well as D part, C++ part is calling extern "C" functions defined in D part of the binding. will this work with dll? And also currently it doesn't use dynamic loading - it's just plain extern (C) function definitions on both sides, is this an issue?
February 10, 2009
On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:

> ideage Wrote:
>
>> Great stuff!
>>
>> Expect window's version!
>>
>>
> So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.

You can try building Qt with DMC. It works quite will in pair with DMD on Windows.

February 11, 2009
Denis Koroskin Wrote:

> On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
> 
> > ideage Wrote:
> >
> >> Great stuff!
> >>
> >> Expect window's version!
> >>
> >>
> > So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
> 
> You can try building Qt with DMC. It works quite will in pair with DMD on Windows.
> 

And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..
February 11, 2009
On Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
> Denis Koroskin Wrote:
>
>> On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
>>
>> > ideage Wrote:
>> >
>> >> Great stuff!
>> >>
>> >> Expect window's version!
>> >>
>> >>
>> > So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
>>
>> You can try building Qt with DMC. It works quite will in pair with DMD on Windows.
>>
>
> And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..
>

You could use mingw's GNU make with CC=dmc.  But I dunno if dmc will compile Qt or not.  I would think it would, though.

--bb
February 11, 2009
Bill Baxter Wrote:

> On Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
> > Denis Koroskin Wrote:
> >
> >> On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov@gmail.com> wrote:
> >>
> >> > ideage Wrote:
> >> >
> >> >> Great stuff!
> >> >>
> >> >> Expect window's version!
> >> >>
> >> >>
> >> > So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
> >>
> >> You can try building Qt with DMC. It works quite will in pair with DMD on Windows.
> >>
> >
> > And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..
> >
> 
> You could use mingw's GNU make with CC=dmc.  But I dunno if dmc will compile Qt or not.  I would think it would, though.
> 
> --bb

Actually I decided to make a dll. It is possible to do it and will be more robust solution. Qt is not tested to be compiled with dmc by trolltech(mingw, msvc and icc are guaranteed).

February 12, 2009
Hello Eldar,

> Bill Baxter Wrote:
> 
>> On Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov
>> <e.insafutdinov@gmail.com> wrote:
>> 
>>> Denis Koroskin Wrote:
>>> 
>>>> On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov
>>>> <e.insafutdinov@gmail.com> wrote:
>>>> 
>>>>> ideage Wrote:
>>>>> 
>>>>>> Great stuff!
>>>>>> 
>>>>>> Expect window's version!
>>>>>> 
>>>>> So after some time trying to build qtd windows packages I realized
>>>>> that there are huge issues. I tried first dmd and since I have to
>>>>> link D part of wrapper with C++ object files produced by mingw -
>>>>> it didnt work and I was told that it's because mingw and dmd have
>>>>> different object file formats. So 2 options left are gdc(which is
>>>>> kinda outdated) and ldc(which doesn't support exception handling).
>>>>> So the situation is suspended, although I am trying to build it
>>>>> with ldc now.
>>>>> 
>>>> You can try building Qt with DMC. It works quite will in pair with
>>>> DMD on Windows.
>>>> 
>>> And will dmc be able to compile Qt? And also as much as I undestdood
>>> make is not compatible with the one that comes with dmc? I will
>>> probably run into a big problem..
>>> 
>> You could use mingw's GNU make with CC=dmc.  But I dunno if dmc will
>> compile Qt or not.  I would think it would, though.
>> 
>> --bb
>> 
> Actually I decided to make a dll. It is possible to do it and will be
> more robust solution. Qt is not tested to be compiled with dmc by
> trolltech(mingw, msvc and icc are guaranteed).
> 


A dll is probably your best option, if you can make it work with the C++ code(?).  I would have thought you needed a C interface, though.  


dmc is rarely supported by the majority of open-source projects out there, so you end up having to fix a lot of makefiles and a lot of code.  It is especially difficult getting C++ code working with such projects because many of these will use macro definitions to enable/disable certain vendor compiler features.  Also you will run into C++ implementation differences that make dmc choke.


On several occasions where I've tried to use dmc for the same reason, and I've come to the conclusion that dmc support is a whole project in itself. It's a huge waste of time if all you want is to interface with a library. I recommend the ddl route if you can make it work.  Most others have done the same.


Incindentally, if you are curious why projects like Derelict and other bindings (using dynamic loading) are so oft used in the D community, this is pretty much the reason.


-JJR


February 12, 2009
> I recommend the ddl route if you can make it work.  


Sorry, not "ddl"... meant to say dll.


:P


February 12, 2009
John Reimer wrote:
> Hello Eldar,
> 
>> Bill Baxter Wrote:
>>
>>> On Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov
>>> <e.insafutdinov@gmail.com> wrote:
>>>
>>>> Denis Koroskin Wrote:
>>>>
>>>>> On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov
>>>>> <e.insafutdinov@gmail.com> wrote:
>>>>>
>>>>>> ideage Wrote:
>>>>>>
>>>>>>> Great stuff!
>>>>>>>
>>>>>>> Expect window's version!
>>>>>>>
>>>>>> So after some time trying to build qtd windows packages I realized
>>>>>> that there are huge issues. I tried first dmd and since I have to
>>>>>> link D part of wrapper with C++ object files produced by mingw -
>>>>>> it didnt work and I was told that it's because mingw and dmd have
>>>>>> different object file formats. So 2 options left are gdc(which is
>>>>>> kinda outdated) and ldc(which doesn't support exception handling).
>>>>>> So the situation is suspended, although I am trying to build it
>>>>>> with ldc now.
>>>>>>
>>>>> You can try building Qt with DMC. It works quite will in pair with
>>>>> DMD on Windows.
>>>>>
>>>> And will dmc be able to compile Qt? And also as much as I undestdood
>>>> make is not compatible with the one that comes with dmc? I will
>>>> probably run into a big problem..
>>>>
>>> You could use mingw's GNU make with CC=dmc.  But I dunno if dmc will
>>> compile Qt or not.  I would think it would, though.
>>>
>>> --bb
>>>
>> Actually I decided to make a dll. It is possible to do it and will be
>> more robust solution. Qt is not tested to be compiled with dmc by
>> trolltech(mingw, msvc and icc are guaranteed).
>>
> 
> 
> A dll is probably your best option, if you can make it work with the C++ code(?).  I would have thought you needed a C interface, though. 
> 
> dmc is rarely supported by the majority of open-source projects out there, so you end up having to fix a lot of makefiles and a lot of code.  It is especially difficult getting C++ code working with such projects because many of these will use macro definitions to enable/disable certain vendor compiler features.  Also you will run into C++ implementation differences that make dmc choke.
> 
> 
> On several occasions where I've tried to use dmc for the same reason, and I've come to the conclusion that dmc support is a whole project in itself. It's a huge waste of time if all you want is to interface with a library. I recommend the ddl route if you can make it work.  Most others have done the same.
> 
> 
> Incindentally, if you are curious why projects like Derelict and other bindings (using dynamic loading) are so oft used in the D community, this is pretty much the reason.
> 
> 
> -JJR

Well, since Qt is going to use the lunatic# LGPL license, you have to use a DLL anyway for commercial use.

# lunatic because of the prohibition against static linking. I cannot understand why anyone would use such an absolutely moronic license.
« First   ‹ Prev
1 2