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: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd


On 2017-06-25 00:31, Wouter van Doorn wrote:
> There isn't one! The default rule does exactly that (although despite
> the -o it creates a hello.exe, but that's fine.

It doesn't seem to be fine - is that not what you're complaining about?
Given your PATH, we don't know which make might be running, which
rules it might be using, and which programs might be producing your
hello.exe which doesn't run, running a simple "gcc -o hello hello.c"
may give you some certainty and possibly success.

In general, your Cygwin profile should prefix your Windows user PATH with
e.g. PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:%PATH%
- append /usr/sbin;/sbin; before %PATH% to also run admin utilities.

Also your Windows user PATH should prefix your Windows system Path with utility
paths you installed and use logged on e.g. PATH ->
C:\Cygwin\usr\local\bin;C:\Cygwin\bin;%ProgramFiles%\<utility>;%ProgramFiles%\<other>\bin;...%Path%

Your Windows system Path should be prefixed with utility paths you may want to
run logged out or under other ids e.g. Path -> ...

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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


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