curses

BlitzMax Forums/Brucey's Modules/curses

jkrankie(Posted 2013) [#1]
bah! curses!

Hilarious puns aside, i can't get curses.mod to build on linux (ubuntu 12.10). i've not tried on Mac yet (does it work on Windows???). I get this error in maxide:

Compiling:alphalist.c
In file included from /home/lisa/Documents/BlitzMax/mod/bah.mod/curses.mod/src/cdk/include/cdk_int.h:13:0,
                 from /home/lisa/Documents/BlitzMax/mod/bah.mod/curses.mod/src/cdk/alphalist.c:1:
/home/lisa/Documents/BlitzMax/mod/bah.mod/curses.mod/src/cdk/include/cdk.h:69:20: fatal error: curses.h: No such file or directory
compilation terminated.
Build Error: failed to compile /home/lisa/Documents/BlitzMax/mod/bah.mod/curses.mod/src/cdk/alphalist.c
Process complete


Cheers
Charlie


Htbaa(Posted 2013) [#2]
Looks like you need the development headers. Try something like apt-get install libcurses-dev. Package is probably called differently, can't check that right now.


jkrankie(Posted 2013) [#3]
Right, i'll give that a try.

Cheers
Charlie


Brucey(Posted 2013) [#4]
As with most of my Linux-side mods which work with "built-in" libraries, you will need the developer packages available on the system.

On Windows, I use the PDCurses library which provides equivalent functionality, and which is compiled directly into the module.

:o)


Sub_Zero(Posted 2014) [#5]
Hi

I get these errors when trying to compile one of your samples in windows (the module itself compiles ok):

C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x30c): undefined reference to `__chkstk_ms'
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x355): undefined reference to `__umoddi3'
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x377): undefined reference to `__udivdi3'
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x4da): undefined reference to `__chkstk_ms'
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x6a4): undefined reference to `__chkstk_ms


Any ideas?


Henri(Posted 2014) [#6]
Hello,

what MinGW package you have ?

-Henri


Sub_Zero(Posted 2014) [#7]
I found the solution:

· Go to Control Panel\System and Security\System -> Advanced system settings -> Environment Variables and create a new environment variable called BMK_LD_OPTS, giving it this value:

-lmsvcrt -lgcc


@Henri: I'm using the latest version :)


Henri(Posted 2014) [#8]
Curses was build with TDM MinGW 4.7.1 32bit I presume. They may use different version of gcc-lib.

-Henri


Brucey(Posted 2014) [#9]
Curses was build with TDM MinGW 4.7.1 32bit I presume

Well, I only provide the source, so it is built with whichever version you have installed.
It may be a static library linkage-ordering issue. If you use my bmk, you probably won't get that error (as it changes the ordering in places for Windows).


Henri(Posted 2014) [#10]
@sub_zero I believe you have more than one MinGW installed or remnants of more than one.

-Henri