Compiling a windows.exe against cygwin1.dll ?

Dave Korn dk@artimi.com
Fri Oct 22 17:58:00 GMT 2004


> -----Original Message-----
> From: cygwin-talk-owner On Behalf Of Wim Van Oudenhove
> Sent: 22 October 2004 17:06

> I've made an executable windows program which some people 
> want to run under cygwin (myself included).
> 
> The problem is that the first parameter to the program is the 
> name of a file, 
> which is expected by windows to be something like c:\dir\file.txt
> 
> Two problems:
> 
> - it doesn't take /cygdrive/c/dir/file.txt
> - it doesn't take a symbolic link generated by cygwin's ln -s command.
> 
> Is there something I can 'borrow' from cygwin1.dll or some 
> other dll to make my 
> program support these two cases ? 
> (The program is a command line tool written using visual C++)

  Well, yeah: what you're really saying there is that you want a cygwin app rather
than a 'doze one.  Rewrite it using the standard ANSI C stdio functions (f)open,
(f)close, (f)read, (f)write (assuming it isn't already using them), and use cygwin
gcc to compile it instead of msvc, and you'll get all that functionality for free.


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



More information about the Cygwin-talk mailing list