This is the mail archive of the cygwin-talk@cygwin.com 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: Compiling a windows.exe against cygwin1.dll ?


Igor Pechtchanski <pechtcha <at> cs.nyu.edu> writes:

> > So I've written a program that translates crontab compatible files to
> > schedules for the windows scheduler. We've used cron, but that relies on
> > the availability of the cygwin stack, which in turn relies on the
> > availability of the central repository on the network.
> 
> Huh?  How's that?
> 
> Did you try running cron locally on each machine (off a local install,
> that is)?
> 

Well, we're stuck with some 5 machines all designed to do the exact same thing. 
When we need to upgrade something, we don't want to be bothered with having to 
upgrade all 5 machines separately. So we have mapped all the /etc, /bin, /var 
etc to a shared drive which we get trough samba from our unix server. The unix 
server is pretty stable, the network isn't always stable. We used to have local 
installs but my colleage decided to remove those to make matters easier to stay 
up to date.

> You might try the MinGW option (give a -mno-cygwin argument to g++).  If
> you have problems or questions, see the MinGW.org website.
> 	Igor

After some lengthy discussions with my colleage and some further searching on 
the web, I had discovered that invoking 'cygpath -w' does exactly what I want.
Furthermore, we could use the presence of a 'TERM' environment variable as a 
trigger that we are running under cygwin. So when cygwin is detected and we 
cannot find a file using the first parameter, I spawn a cygpath process with 
that parameter and try again with the output from that. This seems to solve the 
problem I had. I'm sure there were neater ways to do it but I was lacking time 
and knowledge to come up with something else. Took me some three hours to 
implement that.

I tried to compile it under gcc first, but as soon as CString showed up as 
unknown, I gave up.

So thanks for your attempts to help all, next time we need tooling I might try 
to use gcc first.

Regards,

Wim.


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