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 ?


On Wed, 27 Oct 2004, Wim Van Oudenhove wrote:

> 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.

An alternative way would have been to have a cron job run setup in
unattended mode (yes, it does exist) to upgrade from your local network
mirror and restart the cron service afterwards.

> > 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.

Nope, that seems like the right way to go for what you had in mind.
That's exactly what cygpath is for.

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

Just FYI: <http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html>
should help with the CString issue -- it was the first match in a Google
search for "gcc cstring", BTW.

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

Yep, and help free software in the process... :-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


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