|
Post by alexfish on Oct 24, 2015 18:47:19 GMT 1
Hi Peter
Got a problem
here trying to set the libs option EG:: using Raspberry PI
need a gtk window + make contact with the EGL
PRAGMA INCLUDE gtk-2.0/gtk/gtk.h PRAGMA INCLUDE GLES2/gl2.h PRAGMA INCLUDE EGL/egl.h PRAGMA INCLUDE EGL/eglext.h PRAGMA INCLUDE GLES/gl.h PRAGMA INCLUDE bcm_host.h
PRAGMA OPTIONS `pkg-config --cflags gtk+-2.0` PRAGMA LDFLAGS `pkg-config --libs gtk+-2.0 PRAGMA LDFLAGS -I/usr/lib/arm-linux-gnueabihf/ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib
LOCAL *window TYPE GtkWidget '--- GTK PROTO gtk_init ALIAS INIT PROTO gtk_main ALIAS DISPLAY PROTO gtk_widget_show ALIAS SHOW PROTO gtk_window_new ALIAS WINDOW PROTO gtk_window_set_title PROTO gtk_window_set_default_size PROTO gtk_widget_set_size_request ALIAS SETSIZE
'---extras PROTO g_signal_connect_data ALIAS CALLBACK
'--- GDK PROTO gdk_keyval_name PROTO gdk_event_get_type PROTO gdk_keyval_to_unicode
SUB exit_prog() PRINT " Done" END END SUB
INIT (0, 0) window = WINDOW(GTK_WINDOW_TOPLEVEL) CALLBACK(window, "delete-event",exit_prog, 0, 0, 0) SETSIZE(window, 230, 150) SHOW(window)
DISPLAY
here is a copy of the MAKE FILE note the " INCLUDE" this should be "include"
# Created with BaCon 3.1.1 beta - (c) Peter van Eerten - GPL v3
/home/pi/bacon/testgtkwin: testgtkwin.bac.o cc -o /home/pi/bacon/testgtkwin testgtkwin.bac.o -lbacon -ldl -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -I/usr/lib/arm-1 -gnueabihf/ -I/opt/vc/INCLUDE -I/opt/vc/INCLUDE/interface/vcos/pthreads -I/opt/vc/INCLUDE/interface/vmcs_host/1 -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib testgtkwin.bac.o: testgtkwin.bac.c cc `pkg-config --cflags gtk+-2.0` -c testgtkwin.bac.c
.PHONY: clean clean: rm -f *.o *.c /home/pi/bacon/testgtkwin /home/pi/bacon/testgtkwin.*.* Makefile
BR Alex
|
|
|
Post by alexfish on Oct 24, 2015 19:01:11 GMT 1
Hi Peter
Further To the above
If do the proto like so
PRAGMA INCLUDE GLES2/gl2.h PRAGMA INCLUDE EGL/egl.h PRAGMA INCLUDE EGL/eglext.h PRAGMA INCLUDE GLES/gl.h PRAGMA INCLUDE bcm_host.h
the parsed output is appended with the path where the code is
IEpi@raspberrypi ~ $ cd /tmp pi@raspberrypi /tmp $ make cc `pkg-config --cflags gtk+-2.0` -c testgtkwin.bac.c In file included from testgtkwin.bac.c:2:0: testgtkwin.bac.h:6:38: fatal error: /home/pi/bacon/GLES2/gl2.h: No such file or directory compilation terminated.
if change the bits within the .c and do a straight cc then the app will compile. here are the terminal results
pi@raspberrypi ~ $ cd /tmp pi@raspberrypi /tmp $ cc -o test testgtkwin.bac.c -I/usr/lib/arm-linux-gnueabihf/ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib -lbacon -ldl -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 `pkg-config --cflags gtk+-2.0` pi@raspberrypi /tmp $ ./test
(test:9058): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised Done pi@raspberrypi /tmp $
BR Alex
|
|
|
Post by Pjot on Oct 24, 2015 20:25:28 GMT 1
Hi Alex,
From the errors it is obvious that something goes wrong with the header file detection.
As a workaround, can you try to add the full path to the 'gl2.h' file? E.g.:
PRAGMA INCLUDE /full/path/to/GLES2/gl2.h
But this should not be necessary of course, I will look into it.
Thanks Peter
|
|
|
Post by alexfish on Oct 24, 2015 20:37:42 GMT 1
Hi Peter
did try the hard coded path but get this message
File 'testgtkwin.bac'
Line 2: PRAGMA INCLUDE opt/vc/include/GLES2/gl2.h
Cause: No such file or directory
think the problem is in the lower case syntax that was allowed in latest Bacon versions
here looking specific to the 'include' , this is been converted to 'INCLUDE'
here is a portion of the c file
/* Created with BaCon 3.1.1 beta - (c) Peter van Eerten - GPL v3 */ #include "testgtkwin.bac.generic.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 1 */ #include <gtk-2.0/gtk/gtk.h> /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 2 */ #include "/home/pi/bacon/opt/vc/INCLUDE/GLES2/gl2.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 3 */ #include "/home/pi/bacon/opt/vc/INCLUDE/EGL/egl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 4 */ #include "/home/pi/bacon/opt/vc/INCLUDE/EGL/eglext.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 5 */ #include "/home/pi/bacon/opt/vc/INCLUDE/GLES/gl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 6 */ #include "/home/pi/bacon/opt/vc/INCLUDE/bcm_host.h"
if place a path begin as in /pathto then the code looks like
#include "testgtkwin.bac.generic.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 1 */ #include <gtk-2.0/gtk/gtk.h> /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 2 */ #include "/opt/vc/INCLUDE/GLES2/gl2.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 3 */ #include "/opt/vc/INCLUDE/EGL/egl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 4 */ #include "/opt/vc/INCLUDE/EGL/eglext.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 5 */ #include "/opt/vc/INCLUDE/GLES/gl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 6 */ #include "/opt/vc/INCLUDE/bcm_host.h" BR Alex
|
|
|
Post by Pjot on Oct 24, 2015 20:49:10 GMT 1
Hi Alex,
That is not the full path, you're missing a '/' in the beginning. It should be:
PRAGMA INCLUDE /opt/vc/include/GLES2/gl2.h
Can you try again?
Thx Peter
|
|
|
Post by alexfish on Oct 24, 2015 20:54:01 GMT 1
also got a problem with USEC + #include
IE
the bacon GUI will crash out. have not tested bacon from terminal
BR Alex
|
|
|
Post by alexfish on Oct 24, 2015 21:05:02 GMT 1
Hi Peter
going to do a reboot
but can confirm have tested both the paths and all fail
PRAGMA INCLUDE gtk-2.0/gtk/gtk.h PRAGMA INCLUDE /opt/vc/include/GLES2/gl2.h PRAGMA INCLUDE /opt/vc/include/EGL/egl.h PRAGMA INCLUDE /opt/vc/include/EGL/eglext.h PRAGMA INCLUDE /opt/vc/include/GLES/gl.h PRAGMA INCLUDE /opt/vc/include/bcm_host.h
PRAGMA INCLUDE gtk-2.0/gtk/gtk.h PRAGMA INCLUDE opt/vc/include/GLES2/gl2.h PRAGMA INCLUDE opt/vc/include/EGL/egl.h PRAGMA INCLUDE opt/vc/include/EGL/eglext.h PRAGMA INCLUDE opt/vc/include/GLES/gl.h PRAGMA INCLUDE opt/vc/include/bcm_host.h
also looks like the generated code is not been cleaned if a fail
since the main c file = same as first generated...
a reboot will clean up as normal in the tmp , alternating the two codes , proves this
BR Alex
|
|
|
Post by alexfish on Oct 24, 2015 21:24:51 GMT 1
Hi Peter
For clarity
PRAGMA INCLUDE gtk-2.0/gtk/gtk.h PRAGMA INCLUDE /opt/vc/include/GLES2/gl2.h PRAGMA INCLUDE /opt/vc/include/EGL/egl.h PRAGMA INCLUDE /opt/vc/include/EGL/eglext.h PRAGMA INCLUDE /opt/vc/include/GLES/gl.h PRAGMA INCLUDE /opt/vc/include/bcm_host.h
PRAGMA OPTIONS `pkg-config --cflags gtk+-2.0` PRAGMA LDFLAGS `pkg-config --libs gtk+-2.0` PRAGMA LDFLAGS -I/usr/lib/arm-linux-gnueabihf/ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib
LOCAL *window TYPE GtkWidget '--- GTK PROTO gtk_init ALIAS INIT PROTO gtk_main ALIAS DISPLAY PROTO gtk_widget_show ALIAS SHOW PROTO gtk_window_new ALIAS WINDOW
PROTO gtk_window_set_title PROTO gtk_window_set_default_size PROTO gtk_widget_set_size_request ALIAS SETSIZE
'---extras PROTO g_signal_connect_data ALIAS CALLBACK
'--- GDK PROTO gdk_keyval_name PROTO gdk_event_get_type PROTO gdk_keyval_to_unicode
SUB exit_prog() PRINT " Done" END END SUB
INIT (0, 0) window = WINDOW(GTK_WINDOW_TOPLEVEL) CALLBACK(window, "delete-event",exit_prog, 0, 0, 0) SETSIZE(window, 230, 150) SHOW(window)
DISPLAY
the c file contains
/* Created with BaCon 3.1.1 beta - (c) Peter van Eerten - GPL v3 */ #include "testgtkwin.bac.generic.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 1 */ #include <gtk-2.0/gtk/gtk.h> /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 2 */ #include "/opt/vc/INCLUDE/GLES2/gl2.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 3 */ #include "/opt/vc/INCLUDE/EGL/egl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 4 */ #include "/opt/vc/INCLUDE/EGL/eglext.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 5 */ #include "/opt/vc/INCLUDE/GLES/gl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 6 */ #include "/opt/vc/INCLUDE/bcm_host.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 8 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 9 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 10 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 12 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 14 */ #define INIT gtk_init /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 15 */ #define DISPLAY gtk_main /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 16 */ #define SHOW gtk_widget_show /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 17 */ #define WINDOW gtk_window_new /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 19 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 20 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 21 */ #define SETSIZE gtk_widget_set_size_request /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 25 */ #define CALLBACK g_signal_connect_data /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 28 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 29 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 30 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 32 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 34 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 35 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 36 */ void exit_prog( void); /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 38 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 39 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 40 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 41 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 42 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 44 */ #include "testgtkwin.exit_prog.h"
and
PRAGMA INCLUDE gtk-2.0/gtk/gtk.h PRAGMA INCLUDE opt/vc/include/GLES2/gl2.h PRAGMA INCLUDE opt/vc/include/EGL/egl.h PRAGMA INCLUDE opt/vc/include/EGL/eglext.h PRAGMA INCLUDE opt/vc/include/GLES/gl.h PRAGMA INCLUDE opt/vc/include/bcm_host.h
PRAGMA OPTIONS `pkg-config --cflags gtk+-2.0` PRAGMA LDFLAGS `pkg-config --libs gtk+-2.0` PRAGMA LDFLAGS -I/usr/lib/arm-linux-gnueabihf/ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib
LOCAL *window TYPE GtkWidget '--- GTK PROTO gtk_init ALIAS INIT PROTO gtk_main ALIAS DISPLAY PROTO gtk_widget_show ALIAS SHOW PROTO gtk_window_new ALIAS WINDOW
PROTO gtk_window_set_title PROTO gtk_window_set_default_size PROTO gtk_widget_set_size_request ALIAS SETSIZE
'---extras PROTO g_signal_connect_data ALIAS CALLBACK
'--- GDK PROTO gdk_keyval_name PROTO gdk_event_get_type PROTO gdk_keyval_to_unicode
SUB exit_prog() PRINT " Done" END END SUB
INIT (0, 0) window = WINDOW(GTK_WINDOW_TOPLEVEL) CALLBACK(window, "delete-event",exit_prog, 0, 0, 0) SETSIZE(window, 230, 150) SHOW(window)
DISPLAY
c file
/* Created with BaCon 3.1.1 beta - (c) Peter van Eerten - GPL v3 */ #include "testgtkwin.bac.generic.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 1 */ #include <gtk-2.0/gtk/gtk.h> /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 2 */ #include "/home/pi/bacon/opt/vc/INCLUDE/GLES2/gl2.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 3 */ #include "/home/pi/bacon/opt/vc/INCLUDE/EGL/egl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 4 */ #include "/home/pi/bacon/opt/vc/INCLUDE/EGL/eglext.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 5 */ #include "/home/pi/bacon/opt/vc/INCLUDE/GLES/gl.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 6 */ #include "/home/pi/bacon/opt/vc/INCLUDE/bcm_host.h" /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 8 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 9 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 10 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 12 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 14 */ #define INIT gtk_init /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 15 */ #define DISPLAY gtk_main /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 16 */ #define SHOW gtk_widget_show /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 17 */ #define WINDOW gtk_window_new /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 19 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 20 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 21 */ #define SETSIZE gtk_widget_set_size_request /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 25 */ #define CALLBACK g_signal_connect_data /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 28 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 29 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 30 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 32 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 34 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 35 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 36 */ void exit_prog( void); /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 38 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 39 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 40 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 41 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 42 */ /* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 44 */ #include "testgtkwin.exit_prog.h"
|
|
|
Post by bigbass on Oct 24, 2015 23:35:21 GMT 1
Hey Alex Maybe you should take a backstep and try Installing headers in /usr/include In the system path *If you compliled the libs yourself use the option ./configure --prefix=/usr make make install ldconfig Then see if all all the headers are found By BaCon when you compile ---------------------- I also see what you mean about the include Getting changed to INCLUDE probably some keyword parsing problem Joe
|
|
|
Post by alexfish on Oct 25, 2015 4:49:46 GMT 1
Hey Alex Maybe you should take a backstep and try Installing headers in /usr/include In the system path *If you compliled the libs yourself use the option ./configure --prefix=/usr make make install ldconfig Then see if all all the headers are found By BaCon when you compile ---------------------- I also see what you mean about the include Getting changed to INCLUDE probably some keyword parsing problem Joe Joe . not wanting to seem cruel that is exactly the problem is + there are more bits that do not meld A system like Debian .... is so well integrated... gcc can just run ... yes it has arm specific hang ups Yet I am so convinced that Bacon is at fault. not Yours or Vovchik's efforts or mine could make a difference . look above what i posted.. possible that Peter in simple terms tries to listen those on the other (windows) divide.. what I posted is real.. nothing more and nothing less. BR Alex
|
|
|
Post by alexfish on Oct 25, 2015 4:56:48 GMT 1
+ Joe
I like Your latest bits of how to get ...
Type Def..
U will need them.. Esp EGL + GLES..
an old sane .. been there done it. all the links and the bits work .. including yours
BR alex
|
|
|
Post by bigbass on Oct 25, 2015 6:04:43 GMT 1
Hey Alex
I can't compile your code on my tablet but anyway Just trying to lend a hand to help out Trying to explain the same thing you said with different words
Well lets pin point one line of code This is a problem looking at the conversion to C The word include gets changed to capital letters here include/GLES2. becomes INCLUDE/GLES2 and Linux sees that as a different folder
This is line 2 PRAGMA INCLUDE /opt/vc/include/GLES2/gl2.h
/* FILE /home/pi/bacon/testgtkwin.bac.cpp LINE 2 */ #include "/opt/vc/INCLUDE/GLES2/gl2.h
Joe
|
|
|
Post by Pjot on Oct 25, 2015 8:57:29 GMT 1
Hi Alex, For the include file problem, the issue is caused by the concept that all files are taken in a relative way, in which BaCon does not take any linker flags into account. Usually, in C one can point to directories to lookup include files with the '-I' parameter. But even when we do so, BaCon simply ignores this parameter and tries to determine the position of include files based on relative path logic. To be able to use the '-I' flag in C, we must specify that we want to do so. In such case, the include files must be surrounded by the '<' and '>' symbol. This is also the case in plain C programs. For your program this means the following code adaptation: PRAGMA INCLUDE <GLES2/gl2.h> PRAGMA INCLUDE <EGL/egl.h> PRAGMA INCLUDE <EGL/eglext.h> PRAGMA INCLUDE <GLES/gl.h>
This way, the include files are looked up in paths relative to the '-I' parameter mentioned in your LDFLAGS. However, files which are not surrounded by '<' and '>' still will be taken in a relative way. Please download the latest beta and let me know if this works for you. Not sure where the problem with the INCLUDE comes from - it does not happen on my system, neither when using the '-z' flag. Best regards Peter PS note that I changed the version number, because the overall changes in this release are pretty big, most of them invisible at first glance. In another post I will explain more on this 3.2 release.
|
|
|
Post by alexfish on Oct 25, 2015 15:13:39 GMT 1
Hi Peter
Thanks for the new Bacon 3.2
looking good .
Some findings.
the original ./bacon/settings.cfg reads as
indent 0 linenr 1 wrap 2 savepage 0 lowercase 1 font Monospace 12 color #FFFFFF window_size 1267x690 shell xterm -hold -sb -geometry 132x40 -e @ compiler cc options libraries -lbacon -L /usr/local/lib scheme classic
changing the 'lowercase 1' to 'lowercase 0' resolved the 'include' problem Looks like this is an area to look at . the gui lower case box was not checked . can make sure bacon looks at the checkbox and update accordingly
the LD flags do not link as expected in the makefile .. but the OPTIONS work..
Example for the Raspberry PI
PRAGMA INCLUDE <gtk-2.0/gtk/gtk.h> PRAGMA INCLUDE <GLES2/gl2.h> PRAGMA INCLUDE <EGL/egl.h> PRAGMA INCLUDE <EGL/eglext.h> PRAGMA INCLUDE <GLES/gl.h> PRAGMA INCLUDE <bcm_host.h>
PRAGMA OPTIONS `pkg-config --cflags gtk+-2.0` PRAGMA LDFLAGS `pkg-config --libs gtk+-2.0` PRAGMA OPTIONS -g -lm -ldl -pipe -I/usr/lib/arm-linux-gnueabihf/ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib
LOCAL *window TYPE GtkWidget '--- GTK PROTO gtk_init ALIAS INIT PROTO gtk_main ALIAS DISPLAY PROTO gtk_widget_show ALIAS SHOW PROTO gtk_window_new ALIAS WINDOW
PROTO gtk_window_set_title PROTO gtk_window_set_default_size PROTO gtk_widget_set_size_request ALIAS SETSIZE
'---extras PROTO g_signal_connect_data ALIAS CALLBACK
'--- GDK PROTO gdk_keyval_name PROTO gdk_event_get_type PROTO gdk_keyval_to_unicode
SUB exit_prog() PRINT " Done" END END SUB
INIT (0, 0) window = WINDOW(GTK_WINDOW_TOPLEVEL) CALLBACK(window, "delete-event",exit_prog, 0, 0, 0) SETSIZE(window, 230, 150) SHOW(window)
DISPLAY
the makefile now reads as
# Created with BaCon 3.2 beta - (c) Peter van Eerten - GPL v3
/home/pi/bacon/testgtkwin2: testgtkwin2.bac.o cc -o /home/pi/bacon/testgtkwin2 testgtkwin2.bac.o -lbacon -ldl -lm -lbacon -L /usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 testgtkwin2.bac.o: testgtkwin2.bac.c cc `pkg-config --cflags gtk+-2.0` -g -lm -ldl -pipe -I/usr/lib/arm-linux-gnueabihf/ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib -c testgtkwin2.bac.c
.PHONY: clean clean: rm -f *.o *.c /home/pi/bacon/testgtkwin2 /home/pi/bacon/testgtkwin2.*.* Makefile
Will now do some testing of EGL and GLES . updates and or bugs will be posted on the Raspberry PI thread
Many thanks again + BR Alex
|
|