This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: bug with gcc with findfirst/findnext
- To: root at jacob dot remcomp dot fr (root)
- Subject: Re: bug with gcc with findfirst/findnext
- From: John Mullee <john at exmachina dot net>
- Date: Fri, 06 Nov 1998 16:01:23
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 <pattern>
>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@cygnus.com" with one line of text: "help".