www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - MingW compatibility

reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench robertmuench.de> writes:
Hi, can I use mingw compiled libraries with DMD for Windows?

-- 
Robert M. Münch
http://www.robertmuench.de
Jun 11 2010
parent reply Alex Makhotin <alex bitprox.com> writes:
Robert M. Münch wrote:
 Hi, can I use mingw compiled libraries with DMD for Windows?
 
Hi, Robert. Yes, libraries produced with mingw32 GCC link well with binaries produced with DMD and I didn't notice runtime issues. -- Alex Makhotin, the founder of BITPROX, http://bitprox.com
Jun 11 2010
parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench robertmuench.de> writes:
On 2010-06-11 13:18:34 +0200, Alex Makhotin said:

 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more... -- Robert M. Münch http://www.robertmuench.de
Jun 11 2010
next sibling parent reply Alex Makhotin <alex bitprox.com> writes:
Robert M. Münch wrote:
 On 2010-06-11 13:18:34 +0200, Alex Makhotin said:
 
 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more...
Of course I'm talking about dynamic linking. DLL should be made with the mingw32 GCC, import library produced with implib tool which is then the argument for the linker. Static linking didn't work for me. -- Alex Makhotin, the founder of BITPROX, http://bitprox.com
Jun 11 2010
parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench robertmuench.de> writes:
On 2010-06-11 14:27:27 +0200, Alex Makhotin said:

 Robert M. Münch wrote:
 On 2010-06-11 13:18:34 +0200, Alex Makhotin said:
 
 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more...
Of course I'm talking about dynamic linking. DLL should be made with the mingw32 GCC, import library produced with implib tool which is then the argument for the linker. Static linking didn't work for me.
:-( And I talked about static linking... Getting linux based source-code compiled with DMC is quite hard. I use MSYS and MINGW to compile stuff on windows... not sure if using DMC instead of GCC will help. Hmm... that makes some things much more complicate. -- Robert M. Münch http://www.robertmuench.de
Jun 11 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Robert M. Münch" <robert.muench robertmuench.de> wrote in message 
news:huu08d$1jm6$1 digitalmars.com...
 On 2010-06-11 14:27:27 +0200, Alex Makhotin said:

 Robert M. Münch wrote:
 On 2010-06-11 13:18:34 +0200, Alex Makhotin said:

 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more...
Of course I'm talking about dynamic linking. DLL should be made with the mingw32 GCC, import library produced with implib tool which is then the argument for the linker. Static linking didn't work for me.
:-( And I talked about static linking... Getting linux based source-code compiled with DMC is quite hard. I use MSYS and MINGW to compile stuff on windows... not sure if using DMC instead of GCC will help. Hmm... that makes some things much more complicate.
In my experience, MSYS/Mingw are a PITA in the first place. After numerous times mucking around with both it and apps that require it on windows, I've become convinced that an app that requires Mingw on windows is no more cross-platform than an app that requires wine on Linux. But that's me. YMMV, of course.
Jun 11 2010
next sibling parent =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench robertmuench.de> writes:
On 2010-06-11 20:57:31 +0200, Nick Sabalausky said:

 In my experience, MSYS/Mingw are a PITA in the first place. After 
 numerous times mucking around with both it and apps that require it on 
 windows, I've become convinced that an app that requires Mingw on 
 windows is no more cross-platform than an app that requires wine on 
 Linux. But that's me. YMMV, of course.
I agree. I use it mostly to compile OS stuff from the Linux world on windows. For this it works pretty good. The problem is that those projects are GCC centric, and DMC doesn't play this role very good. My idea was to compile this stuff with MingW and statically link it with D later. -- Robert M. Münch http://www.robertmuench.de
Jun 11 2010
prev sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Nick Sabalausky Wrote:

 "Robert M. Münch" <robert.muench robertmuench.de> wrote in message 
 news:huu08d$1jm6$1 digitalmars.com...
 On 2010-06-11 14:27:27 +0200, Alex Makhotin said:

 Robert M. Münch wrote:
 On 2010-06-11 13:18:34 +0200, Alex Makhotin said:

 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more...
Of course I'm talking about dynamic linking. DLL should be made with the mingw32 GCC, import library produced with implib tool which is then the argument for the linker. Static linking didn't work for me.
:-( And I talked about static linking... Getting linux based source-code compiled with DMC is quite hard. I use MSYS and MINGW to compile stuff on windows... not sure if using DMC instead of GCC will help. Hmm... that makes some things much more complicate.
In my experience, MSYS/Mingw are a PITA in the first place. After numerous times mucking around with both it and apps that require it on windows, I've become convinced that an app that requires Mingw on windows is no more cross-platform than an app that requires wine on Linux. But that's me. YMMV, of course.
The newer TDM project might be of help, they've made some Windows binaries for both x86 and x64. (The MinGW installation has to be removed first, or at least the folder has to be renamed because GCC explicitly looks for a "MinGW" folder). http://tdm-gcc.tdragon.net/
Jun 13 2010
parent "Nick Sabalausky" <a a.a> writes:
"Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message 
news:hv325f$2s27$1 digitalmars.com...
 Nick Sabalausky Wrote:
 In my experience, MSYS/Mingw are a PITA in the first place. After 
 numerous
 times mucking around with both it and apps that require it on windows, 
 I've
 become convinced that an app that requires Mingw on windows is no more
 cross-platform than an app that requires wine on Linux. But that's me. 
 YMMV,
 of course.
The newer TDM project might be of help, they've made some Windows binaries for both x86 and x64. (The MinGW installation has to be removed first, or at least the folder has to be renamed because GCC explicitly looks for a "MinGW" folder). http://tdm-gcc.tdragon.net/
Cool, I'll have to remember that project. ------------------------------- Not sent from an iPhone.
Jun 13 2010
prev sibling parent reply Bane <branimir.milosavljevic gmail.com> writes:
Robert M. Münch Wrote:

 On 2010-06-11 13:18:34 +0200, Alex Makhotin said:
 
 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more... -- Robert M. Münch http://www.robertmuench.de
I don't remember having problems with using any dll on windows, implib does good job. As far for linking static lib, I believe compiling it with dmc is required.
Jun 11 2010
parent SiegeLord <none none.com> writes:
Bane Wrote:

 Robert M. Münch Wrote:
 
 On 2010-06-11 13:18:34 +0200, Alex Makhotin said:
 
 Yes, libraries produced with mingw32 GCC link well with binaries 
 produced with DMD and I didn't notice runtime issues.
Perfect! I start to like D more and more... -- Robert M. Münch http://www.robertmuench.de
I don't remember having problems with using any dll on windows, implib does good job. As far for linking static lib, I believe compiling it with dmc is required.
I've run into issues with MinGW generated libraries that returned structs, so ymmw. See http://d.puremagic.com/issues/show_bug.cgi?id=3717 -SiegeLord
Jun 11 2010