This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: fopens fails to open binary files on Vista


On 10 July 2007 20:52, Kirk Russell wrote:

> I am running Windows Vista and I have written a program on cygwin that
> opens a binary file using the fopen call with a mode of "rb". At run time I
> receive the following error message:  
> 
> Invalid Parameter passed to C runtime function.
> 
> If I were to remove the "b" in "rb", the library call is successful. Is
> there a different way to open binary files when running an executable on
> cygwin, on Vista.  

  You aren't running an executable on cygwin at all.  You are running a plain
old windows program.

> Here is how I am building my executable. I would appreciate any help or
> information you could give me. 

  The standard response at this point is ....

> gcc -DHAVE_CONFIG_H -I. -I/home/krussell//usr/win32/include  -I. -I
>  /usr/include /usr/local/ssl/lib/libcrypto.a -g -O2 -Wall -W -MT
> secureDisk.o -MD -MP -MF "secureDisk.Tpo" -o secureDisk -mno-cygwin

 .... "what part of NO cygwin don't you get?"  :-)

  What you are writing is a plain old windows program.  The error message
comes from the windows C runtime library MSVCRT.  Whatever the source of the
problem is, it's nothing to do with cygwin and you'd probably be best off
getting advice from a windows/msvc/mingw programming list.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]