Porting OS/2 EMX __findfirst / __findnext
Larry Hall (RFK Partners, Inc)
Tue Apr 11 12:14:00 GMT 2000
At 10:28 AM 4/11/00, peter karlsson wrote:
> > If you're using the Cygwin compiler (and not the Mingw one), you can't just
> > list crtdll as a library. You'll be mixing the MS C RT with the Cygwin one
> > and that will surely crash. If you use the Mingw compiler, you don't need
> > to specify the C RT either, since you'll get one of the MS ones by default.
>I am using CygWin B20. I wasn't aware that there was something like a "Mingw
>compiler", since the only reference to Mingw that I have seen is the header
>files and the mingw32 library included with CygWin B20...
You need to look at Mumit Kahn's web pages to understand the differences
between Cygwin and Mingw. They aren't the same thing and you can't mix and
match libraries and headers generally. The short synopsis is, the Mingw
version of the gcc compiler should be used for programs that want the native
(MS) C runtime, without the overhead (and license "restrictions") of Cygwin.
Cygwin should be used for programs that have POSIX semantics (probably those
that are ported from *NIX platforms).
> > Since you're not trying to port a UNIX app, I'd suggest using Mingw so that
> > you don't pull in the Cygwin DLL and the overhead that goes with it. See
> > Mumit Kahn's web pages for more information on the differences between the
> > Cygwin compiler, the Mingw compiler, and how to build things with either/
> > both.
>Where can I get this Mingw?
As I mentioned, check out Mumit Kahn's site. Follow the pointer from the
> > Alternatively, you can just use the Cygwin compiler and use _findfirst()
> > and _findnext() (or its Win32 equivalents) and add the appropriate prototype
> > (if its not in the header files already). Obviously, you can use Win32 calls
> > directly....
>As I said, there are prototypes in mingw32/dir.h, but the program refuses to
>link if I call the functions prototyped there. If I grep for _findfirst, I
>find it in the libmingw32 file, but it won't link even with that one.
>And for using Win32 calls, from what I figured from the FAQ, I need to write
>-mwindows to do that, and that will turn the program into a GUI application,
>which I do not want...?
There's a way to get Win32 calls for console apps but I don't recall the
Perhaps Tim Prince's response is the best one - why not just use autoconf
and avoid all the troubles/confusion of what environment to use, at least
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org
More information about the Cygwin