From: john AT exmachina DOT net (John Mullee) Subject: Re: bug with gcc with findfirst/findnext 7 Nov 1998 05:39:34 -0800 Message-ID: <3.0.3.16.19981106160123.282790f4.cygnus.gnu-win32@exmachina.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: root AT jacob DOT remcomp DOT fr (root) At 01:50 1998-11-04 +0100, you wrote: >The functions _findfirst and _findnext Will not work with the last version of gcc (mingw32). (snip) >int main(int argc,char *argv[]) > printf("Listing of\t%s\n\n",argv[1]); > /* find the first file that matches */ > if ((handle = FindFirstFile(argv[1],&data)) == INVALID_HANDLE_VALUE) { (snip) >Example of usage: >D:\lcc\demo\findfirst>gcc findfiles.c >D:\lcc\demo\findfirst>a >Usage: findfiles >D:\lcc\demo\findfirst>a *.* >Listing of a.exe > >a.exe 20998 1998 Nov 04:01:33:20 > >D:\lcc\demo\findfirst> >What is REALLY WEIRD is that if you run the same executable that fails under >the msvc debugger, it will work!!! I think you might examine the 'globbing' more closely. I think that when you run >a *.*, your main gets argc=num_files+1, but you only FindFirstFile with the first argv[1]. Try looping over argv? HTH John. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".