www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc on mingw

reply "Carlos Santander B." <csantander619 gmail.com> writes:
gdc doesn't compile on mingw, but the problems are easily solved. I 
tried to compile it with gcc 3.2.3 and 3.4.2, using the sources for 3.4.2.

First off, mingw headers don't define alloca. Why, I don't know. So, 
every file that uses it has to add:

#ifdef __MINGW32__
void *alloca(size_t);
#endif

Also, gcc complains about stricmp (in dmd/gnuc.h) having both C and C++ 
linkage. It's solved by surrounding it with #ifndef __MINGW32__.

I think that was it. I don't know if it works, because I can't really 
finish making gcc 3.4.2 (it can't build libstdc++3: it complains about 
the C++ preprocessor, which is trying to find in /lib/cpp, which doesn't 
even exist). Has anyone had luck building gcc 3.4.2?

I'll keep trying to get it done, but that's what I've found so far.

_______________________
Carlos Santander Bernal
Feb 17 2005
next sibling parent reply Manfred Nowak <svv1999 hotmail.com> writes:
"Carlos Santander B." <csantander619 gmail.com> wrote in
news:cv35u9$13ps$1 digitaldaemon.com: 

 gdc doesn't compile on mingw

tried that independently, because of the reported malfunctioning on cygwin. I got stuck at the point that `pipe' and `fork' are unknown to gcc and glibc is not ported to mingw. In the hope that the bash-version mingw uses contains both, I even not got that version of bash compiled under mingw. So mingw is a really minimalistic gnu version :-( -manfred
Feb 19 2005
parent Mark Junker <mjscod gmx.de> writes:
Manfred Nowak schrieb:

 tried that independently, because of the reported malfunctioning on 
 cygwin. I got stuck at the point that `pipe' and `fork' are unknown to 
 gcc and glibc is not ported to mingw. In the hope that the bash-version 
 mingw uses contains both, I even not got that version of bash compiled 
 under mingw. So mingw is a really minimalistic gnu version :-(

I'm unsure but it might help to dowload/install/use msysDTK, and msysDVLPR. Regards, Mark
Feb 19 2005
prev sibling parent reply Ilya Minkov <minkov cs.tum.edu> writes:
Carlos Santander B. wrote:
 First off, mingw headers don't define alloca. Why, I don't know. So, 
 every file that uses it has to add:
 
 #ifdef __MINGW32__
 void *alloca(size_t);
 #endif

Really? Mine has it in malloc.h - and it #defines it to be a builtin-call instead of a library function. -eye
Mar 14 2005
parent "Carlos Santander B." <csantander619 gmail.com> writes:
Ilya Minkov wrote:
 Carlos Santander B. wrote:
 
 First off, mingw headers don't define alloca. Why, I don't know. So, 
 every file that uses it has to add:

 #ifdef __MINGW32__
 void *alloca(size_t);
 #endif

Really? Mine has it in malloc.h - and it #defines it to be a builtin-call instead of a library function. -eye

Well, I couldn't find it anywhere back then, and that's what I had to do. But since using mingw was so disappointing (compared to cygwin or a real unix), I already uninstalled it. _______________________ Carlos Santander Bernal
Mar 14 2005