Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread Darik Horn
On Mon, Nov 2, 2015 at 10:14 AM, Greg Freemyer  wrote:
>
> The last time I checked (a few years ago), my understanding was the
> cygwin dll's were licensed such that any programs using them had to be
> GPL (or equivalent).
>
> Is that wrong?

No, that is still the case:

* https://cygwin.com/licensing.html


> If so, anyone wanting to write a commercial tool has to avoid the
> cygwin's core dll's.

Or buy a license.


> Does using mingw do so?

No, it is easier to avoid GPL obligations by using the MinGW runtime:

* http://www.mingw.org/license

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



Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread Greg Freemyer
On Mon, Nov 2, 2015 at 7:48 AM, cyg Simple  wrote:
> On 11/1/2015 11:09 PM, Darik Horn wrote:
>>
>> Unless there is a specific reason to cross through Cygwin, it could be
>> easier to use the native MinGW environment directly:
>>
>> * http://www.mingw.org/wiki/Getting_Started
>>
>
> Poppycock! There is no reason that the user couldn't use Cygwin as the
> one and only system to build native binaries.

I'm relatively new to this mailing list.  Apologies if this is well
covered ground

The last time I checked (a few years ago), my understanding was the
cygwin dll's were licensed such that any programs using them had to be
GPL (or equivalent).

Is that wrong?

If so, anyone wanting to write a commercial tool has to avoid the
cygwin's core dll's.

Does using mingw do so?

Thanks
Greg

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



Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread Corinna Vinschen
On Nov  2 10:14, Greg Freemyer wrote:
> On Mon, Nov 2, 2015 at 7:48 AM, cyg Simple  wrote:
> > On 11/1/2015 11:09 PM, Darik Horn wrote:
> >>
> >> Unless there is a specific reason to cross through Cygwin, it could be
> >> easier to use the native MinGW environment directly:
> >>
> >> * http://www.mingw.org/wiki/Getting_Started
> >>
> >
> > Poppycock! There is no reason that the user couldn't use Cygwin as the
> > one and only system to build native binaries.
> 
> I'm relatively new to this mailing list.  Apologies if this is well
> covered ground
> 
> The last time I checked (a few years ago), my understanding was the
> cygwin dll's were licensed such that any programs using them had to be
> GPL (or equivalent).

Yes, when linking against the Cygwin DLL there are GPL issues.

But that wasn't what "cyg Simple" was referring to.  The Cygwin distro
comes with a Mingw-w64 cross compiler and libs.  When you use those to
create Mingw binaries, you are not linking against the Cygwin DLL.

So, as "cyg Simple" wrote, there's no reason that you can't use the
Cygwin distro as environment to build non-Cygwin binaries.

There's also the fact that the aforementioned mingw.org project is
rather behind.  The Mingw-w64 fork (which is used by Cygwin as well,
incidentally) is more up to speed in terms of WIndows lib and header
file support.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


pgpinEZzGRqRZ.pgp
Description: PGP signature


Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread cyg Simple
On 11/1/2015 10:04 PM, Daniel Goldman wrote:
> 
> $ gcc ncurses-1.c -lncurses
> 
> $ ./a.exe # runs perfectly under cygwin
> 

A Cygwin build using the Cygwin runtime should work.

> $ i686-pc-mingw32-gcc -I /usr/include ncurses-1.c -L /lib -lncurses
> 
> $ ./a.exe
> Segmentation fault
> 

A MinGW build using the Cygwin runtime should *never* work.

> 
> What am I doing wrong? How do I use cygwin to compile the test ncurses
> program so it can run in a dos terminal, independent of cygwin? I looked
> around the docs and archives and could not figure out.
> 

You need to specify include and lib paths that contain MinGW libraries.
 Don't use the Cygwin native paths of /usr/include and /lib.  This means
that you need a ncurses library that is built with MinGW.

-- 
cyg Simple

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



Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-02 Thread cyg Simple
On 11/1/2015 11:09 PM, Darik Horn wrote:
> 
> Unless there is a specific reason to cross through Cygwin, it could be
> easier to use the native MinGW environment directly:
> 
> * http://www.mingw.org/wiki/Getting_Started
> 

Poppycock! There is no reason that the user couldn't use Cygwin as the
one and only system to build native binaries.

> And link against the ncurses redistributable:
> 
> * http://invisible-mirror.net/ncurses/ncurses.html
> 

Building your own native library with a known set of compilers and
options may be better than depending on someone's build where you don't
know for certain the system, options and compiler used.

-- 
cyg Simple

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



Re: compile ncurses "hello world" to run independent of cygwin?

2015-11-01 Thread Darik Horn
On Sun, Nov 1, 2015 at 10:04 PM, Daniel Goldman  wrote:
>
> What am I doing wrong? How do I use cygwin to compile the test ncurses
> program so it can run in a dos terminal, independent of cygwin? I looked
> around the docs and archives and could not figure out.

Was libncurses built for the MinGW target on the Cygwin host?

Keep in mind that this job is a cross compile, so ncurses and every
other dependency must be built for the MinGW runtime.  The mingw-* and
mingw64-* packages for Cygwin are just the toolchain plus some
essentials; there is no mingw-libncurses-devel package in
distribution.

Unless there is a specific reason to cross through Cygwin, it could be
easier to use the native MinGW environment directly:

* http://www.mingw.org/wiki/Getting_Started

And link against the ncurses redistributable:

* http://invisible-mirror.net/ncurses/ncurses.html

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



compile ncurses "hello world" to run independent of cygwin?

2015-11-01 Thread Daniel Goldman

I have a Windows 7 / 64 bit PC.

I just installed 32 bit cygwin to d:\cygin\. Installed everything.
https://cygwin.com/faq.html#faq.setup.everything

I started up the Cygwin Terminal.

$ echo $PATH
/usr/local/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft 
Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common 
Files/Microsoft Shared/Windows 
Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program 
Files (x86)/Intel/OpenCL SDK/3.0/bin/x86:/cygdrive/c/Program Files 
(x86)/Intel/OpenCL SDK/3.0/bin/x64:/cygdrive/d/Program Files 
(x86)/Putty:/cygdrive/c/Program Files (x86)/Windows 
Live/Shared:/cygdrive/d/msys64/usr/bin:/usr/lib/lapack:/usr/openwin/bin


$ cat ncurses-1.c
// http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html

#include 

int main()
 {
 initscr(); /* Start curses mode */
 printw("Hello World !!!"); /* Print Hello World */
 refresh(); /* Print it on to the real screen */
 getch(); /* Wait for user input */
 endwin(); /* End curses mode */

 return 0;
 }

$ gcc ncurses-1.c -lncurses

$ ./a.exe # runs perfectly under cygwin

$ i686-pc-mingw32-gcc -I /usr/include ncurses-1.c -L /lib -lncurses

$ ./a.exe
Segmentation fault

Switching to a windows 7 command window (dos window), and running a.exe, 
I get an error message:


"the program can't start because cygncursesw-10.dll is missing..."

What am I doing wrong? How do I use cygwin to compile the test ncurses 
program so it can run in a dos terminal, independent of cygwin? I looked 
around the docs and archives and could not figure out.


Thanks,
Daniel

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