hello TeeEmCee
there's one anomaly with FB on my Mac and that is that it does not accept input from the numeric keypad unless I first press the clear key which is the num key on a Windows keyboard and neither does it accept a delete (backspace?)
is there a way to turn the numeric keypad on at runtime?
also I have not found a way to delete a character from user input, the delete key causes the curser to jump up about 3 lines.
btw, on OS X Lion there were no such problems.
Unofficial FreeBASIC 1.04.0 OS X release
Re: Unofficial FreeBASIC 1.04.0 OS X release
how can I build FB so that it will not give me this warnings
never mind, it was hardcoded in fbc.bas I changed it to my current os version and no more ld warnings.ld: warning: object file (/usr/local/lib/freebasic/darwin-x86_64/libfb.a(con_input.o)) was built for newer OSX version (10.13) than being linked (10.4)
Last edited by srvaldez on Oct 03, 2017 18:47, edited 1 time in total.
Re: Unofficial FreeBASIC 1.04.0 OS X release
also when building FB there's this warning
I am using this FB branch https://github.com/rversteegen/fbc/tree ... 8132d23bbd
I suspect that it may be the root of my keyboard problems.src/gfxlib2/unix/gfx_x11.c:584:68: warning: incompatible pointer types passing 'KeySym *(Display *, unsigned int, int, int *)'
(aka 'unsigned long *(struct _XDisplay *, unsigned int, int, int *)') to parameter of type 'XGETKEYBOARDMAPPING' (aka
'unsigned long *(*)(struct _XDisplay *, unsigned char, int, int *)') [-Wincompatible-pointer-types]
fb_hInitX11KeycodeToScancodeTb( fb_x11.display, XDisplayKeycodes, XGetKeyboardMapping, XFree );
^~~~~~~~~~~~~~~~~~~
src/gfxlib2/unix/../../rtlib/unix/fb_private_scancodes_x11.h:19:23: note: passing argument to parameter 'GetKeyboardMapping' here
XGETKEYBOARDMAPPING GetKeyboardMapping,
^
1 warning generated.
I am using this FB branch https://github.com/rversteegen/fbc/tree ... 8132d23bbd
Re: Unofficial FreeBASIC 1.04.0 OS X release
Yikes, that looks like a serious error; I wonder what's happening there? I fear it's some change in the X11 headers on OSX.
I don't have access to my mac at the moment.
I don't have access to my mac at the moment.
Probably we should add a commandline argument to fbc to specify the OSX version to target instead of hardcoding one, because there is no version we can target that isn't going to cause problems (I still target OSX 10.4 when compiling, though I haven't heard from anyone using it for a while. Though I have a proportionally large amount of Mac users, because there are few game engines that work on MacOS)srvaldez wrote:never mind, it was hardcoded in fbc.bas I changed it to my current os version and no more ld warnings.ld: warning: object file (/usr/local/lib/freebasic/darwin-x86_64/libfb.a(con_input.o)) was built for newer OSX version (10.13) than being linked (10.4)
Re: Unofficial FreeBASIC 1.04.0 OS X release
It looks like XGetKeyboardMapping()'s second parameter (keycode_entry) is an "unsigned int" instead of "KeyCode aka. unsigned char" as expected by FB's XGETKEYBOARDMAPPING typedef. The declaration here looks like
I don't know what NeedWidePrototypes is there for, but apparently it's enabled in your case. Best thing may be to adjust FB to respect the NeedWidePrototypes option and adjust its typedefs based on that.
Using -Werror can help a lot to force finding and fixing such problems.
Code: Select all
extern KeySym *XGetKeyboardMapping(
Display* /* display */,
#if NeedWidePrototypes
unsigned int /* first_keycode */,
#else
KeyCode /* first_keycode */,
#endif
int /* keycode_count */,
int* /* keysyms_per_keycode_return */
);
Using -Werror can help a lot to force finding and fixing such problems.
config.mk wrote: FBFLAGS := -g -exx -maxerr 1
CFLAGS := -g -O2 -Werror -Wfatal-errors -DDEBUG
Re: Unofficial FreeBASIC 1.04.0 OS X release
thank you dkl and TeeEmCee :-)