ghaerr / microwindows

The Nano-X Window System
Other
659 stars 90 forks source link

Build fails with Allegro 5.2.x #17

Closed nwrkbiz closed 5 years ago

nwrkbiz commented 5 years ago

When trying to build with allegro 5.2.x the build fails with following error:

es/nanox/microwindows-master/src/obj/drivers/scr_allegro5.o /home/giri/workspace/fltk_mvc_template/MVC/packages/nanox/microwindows-master/src/drivers/scr_allegro5.c
/home/giri/workspace/fltk_mvc_template/MVC/packages/nanox/microwindows-master/src/drivers/scr_allegro5.c: In function 'init_allegro':
/home/giri/workspace/fltk_mvc_template/MVC/packages/nanox/microwindows-master/src/drivers/scr_allegro5.c:134:31: error: 'ALLEGRO_MOUSE_EMULATION_5_0_x' undeclared (first use in this function)
   al_set_mouse_emulation_mode(ALLEGRO_MOUSE_EMULATION_5_0_x);
                               ^
/home/giri/workspace/fltk_mvc_template/MVC/packages/nanox/microwindows-master/src/drivers/scr_allegro5.c:134:31: note: each undeclared identifier is reported only once for each function it appears in
/home/giri/workspace/fltk_mvc_template/MVC/packages/nanox/microwindows-master/src/drivers/scr_allegro5.c:136:4: warning: passing argument 2 of 'al_register_event_source' makes pointer from integer without a cast
    al_get_touch_input_mouse_emulation_event_source());
    ^
In file included from ../../../../../lib_include/android_arm/allegro5/base.h:50:0,
                 from ../../../../../lib_include/android_arm/allegro5/allegro.h:26,
                 from /home/giri/workspace/fltk_mvc_template/MVC/packages/nanox/microwindows-master/src/drivers/scr_allegro5.c:15:
../../../../../lib_include/android_arm/allegro5/events.h:249:15: note: expected 'struct ALLEGRO_EVENT_SOURCE *' but argument is of type 'int'
 AL_FUNC(void, al_register_event_source, (ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT_SOURCE*));
               ^
../../../../../lib_include/android_arm/allegro5/internal/alconfig.h:175:57: note: in definition of macro 'AL_FUNC'
    #define AL_FUNC(type, name, args)               type name args
                                                         ^
ghaerr commented 5 years ago

I will have to look into this. The Allegro driver library v5.1.13 will not build on my OS X system, so I am using v5.2.4. The Microwindows scr_allegro5.c was updated by me for speed but uses no new Allegro API calls, just rearrangement for a single update operation per select() cycle, so you should be fine with using v5.1.13 for Android. Can you verify that v5.1.13 still compiles and works for you?

nwrkbiz commented 5 years ago

Jep v5.1.13 works perfectly fine, but switching to v5.2.4 would make sense, because they have fixed some stuff that made allegro crashing on android. (changing screen orientation, put app to background etc., ...)

What allegro header files are you using, the ones from the v5.2.4 source tarball?

ghaerr commented 5 years ago

Yes, I’m using the headers from the 5.2.4 source .zip file.

Is is possible they renamed that MOUSE_EMULATION mode that your app build fails on, except that it compiles on OS X.

On Feb 4, 2019, at 9:51 AM, Daniel G. notifications@github.com wrote:

Jep v5.1.13 works perfectly fine, but switching to v5.2.4 would make sense, because they have fixed some stuff that made allegro crashing on android. (changing screen orientation, put app to background etc., ...)

What allegro header files are you using, the ones from the v5.2.4 source tarball?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ghaerr/microwindows/issues/17#issuecomment-460323105, or mute the thread https://github.com/notifications/unsubscribe-auth/ALbi5QPi_qRCS9V7JfuKss7leB5IJX7Bks5vKGUmgaJpZM4ahWEA.

nwrkbiz commented 5 years ago

define ALLEGRO_UNSTABLE is missing before the allegro.h include, seems like this mouse emulation stuff is considered as unstable by allegro :) I created a pull request.