public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ncurses, Windows 8.1 64 bit
@ 2013-11-22  4:00 Michael Purves
  2013-11-22  9:42 ` David Kilroy
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Purves @ 2013-11-22  4:00 UTC (permalink / raw)
  To: cygwin

I'm having a great deal of difficulty getting my programs that use curses to
compile with Windows 8.1 64 bit. I've been
using/usr/x86_64-w64-mingw32/sys-root/mingw for the header and library
files. When the compiler couldn't find some of the necessary header files
that are in /usr/include, I copied them to the appropriate place under
/usr/x86_64-w64-ming32. I also copied the various libcurses.a type libraries
from /usr/lib to my $(CMDIR)/lib. I tried various combinations of -lcurses,
-lcurses.dll, -lncurses, -lncurses.dll, -lncursesw and -lncursesw.dll.

I compiled my libraries libyxycm.a and libyxymath. The dbm.c and dblib.c
both have:
#include <asm/byteorder.h> which defines ntohs and ntohl.

cmui.c and mkregbuf.c both have:
#include <regex.h> which defines regexec and regcomp.

I really don't have any idea of where to go from here. If anyone has an
ideas, I would be most grateful.

The output from the make is below:

rm -f *.o *stackdump
/bin/x86_64-w64-mingw32-gcc.exe
-I/usr/x86_64-w64-mingw32/sys-root/mingw/include
-I/usr/x86_64-w64-mingw32/sys-root/mingw/include/ncurses
-I/home/climate/incl -ansi -D_CMDIR=\"/home/climate\" -D_POSIX_C_SOURCE 
-D_CYGWIN_SOURCE  -D__EXTENSIONS__    -c -o amdsp.o amdsp.c
/bin/x86_64-w64-mingw32-gcc.exe
-I/usr/x86_64-w64-mingw32/sys-root/mingw/include
-I/usr/x86_64-w64-mingw32/sys-root/mingw/include/ncurses
-I/home/climate/incl -ansi -D_CMDIR=\"/home/climate\" -D_POSIX_C_SOURCE 
-D_CYGWIN_SOURCE  -D__EXTENSIONS__  -o amdsp amdsp.o -L
/usr/x86_64-w64-mingw32/sys-root/mingw/lib -L
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/w32api  -L /home/climate/lib
-lncurses -lyxycm -lyxymath
/home/climate/lib/libyxycm.a:dbm.c:(.text+0x3f9): undefined reference to `ntohs'
/home/climate/lib/libyxycm.a:dbm.c:(.text+0x14ca): more undefined references
to `ntohs' follow
/home/climate/lib/libyxycm.a:dblib.c:(.text+0x1c4a): undefined reference to
`ntohl'
/home/climate/lib/libyxycm.a:dblib.c:(.text+0x1cdf): undefined reference to
`ntohl'
/home/climate/lib/libyxycm.a:cmui.c:(.text+0x8803): undefined reference to
`regexec'
/home/climate/lib/libyxycm.a:cmui.c:(.text+0x8a37): undefined reference to
`regcomp'
/home/climate/lib/libyxycm.a:mkregbuf.c:(.text+0xb23b): undefined reference
to `regcomp'
/home/climate/lib/libyxycm.a:dbmu.c:(.text+0xcb2d): undefined reference to
`ntohl'
/home/climate/lib/libyxycm.a:dbmu.c:(.text+0xdbbf): more undefined
references to `ntohl' follow
/bin/x86_64-w64-mingw32-ld: /home/climate/lib/libyxycm.a: bad reloc address
0x0 in section `.data'
collect2: error: ld returned 1 exit status
makefile:30: recipe for target 'amdsp' failed
make: *** [amdsp] Error 1



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ncurses, Windows 8.1 64 bit
  2013-11-22  4:00 ncurses, Windows 8.1 64 bit Michael Purves
@ 2013-11-22  9:42 ` David Kilroy
  2013-11-22 20:42   ` Michael Purves
  0 siblings, 1 reply; 3+ messages in thread
From: David Kilroy @ 2013-11-22  9:42 UTC (permalink / raw)
  To: cygwin

On 22/11/13 03:57, Michael Purves wrote:
> I'm having a great deal of difficulty getting my programs that use curses to
> compile with Windows 8.1 64 bit. I've been
> using/usr/x86_64-w64-mingw32/sys-root/mingw for the header and library
> files. When the compiler couldn't find some of the necessary header files
> that are in /usr/include, I copied them to the appropriate place under
> /usr/x86_64-w64-ming32. I also copied the various libcurses.a type libraries
> from /usr/lib to my $(CMDIR)/lib. I tried various combinations of -lcurses,
> -lcurses.dll, -lncurses, -lncurses.dll, -lncursesw and -lncursesw.dll.

Stop. Undo all the above. You've told gcc that your mingw system 
supports various cygwin libraries/calls. GCC will happily compile your 
code and fail to link.

You first need to decide whether you want a mingw or cygwin application. 
If cygwin, you also have a cygwin32/cygwin64 choice. 32 bit cygwin will 
compile and work on 64 bit windows. Cygwin64 currently has fewer 
packages. Ncurses is available in both. Then make sure you have all the 
necessary libraries in your chosen environment.

If you choose mingw (your current effort), then I believe further 
discussion in this list is off topic. Hint: you will want the mingw 
ncurses library and headers.

To compile against cygwin ncurses, install the appropriate headers and 
libs (libncursesw-devel, libncursesw, ncurses) using setup. Then use gcc 
(i686-pc-cygwin-gcc or x86_64-pc-cygwin-gcc) as your compiler.


Dave.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ncurses, Windows 8.1 64 bit
  2013-11-22  9:42 ` David Kilroy
@ 2013-11-22 20:42   ` Michael Purves
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Purves @ 2013-11-22 20:42 UTC (permalink / raw)
  To: cygwin

Thank you, Dave! Onwards and upwards...

Michael




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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-22 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22  4:00 ncurses, Windows 8.1 64 bit Michael Purves
2013-11-22  9:42 ` David Kilroy
2013-11-22 20:42   ` Michael Purves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).