Hello JORIS
I'm happy to see i'm not alone in this new adventure
This is all the history

I love C since numerous years i know PB, but never dare to try to learn it, and like PB do all nearly like C for the little project, in fact i not see the real interest except the "pleasure" to begin this adventure
But in my job, my boss forced me to use RASPBERRY with PYTHON at the beginning
Like i have nerver see LINUX and PYTHON...for me it's the end of the world
Little bit by little bit, i begin to understand a little part of LINUX
(Very little)
I have try PYTHON and hate it
Then i have ask to my boss if i can use my love of C (Yes.... i know...i love something without know it)
But when you love a woman,
you not know it too ....right

So between me and the C...it's the same thing ..
It's "The unknown love"
Then now ...for little KCC...
- It's the moment to know a little bit the linux world
- I have a good reason to learn my love of C
- I have a machine (raspberry) also big than my knowledge in programming
But i have see, RASPBERRY is not really powerfull for programming on it
Better to use a real machine for compil, and after send the executable to RASP
Then i have read it's possible to crosscompil on windows a RASPBIAN executable

And it's really simple, because even KCC have understand, it's the real proof
I want do that with the windows console, like this i can use the amazing code of the great INFRATEC for compil C source with my love PB
viewtopic.php?p=482009#p482009
For have all the parameters, i use for example
Code: Select all
C:\MinGW\bin\pkg-config --cflags --libs gtk+-2.0
On windows for compil a GTK application it's necessary to include all the GTK library in the std parameters
Then this is the "little" console command
Code: Select all
C:\MinGW\bin\gcc -mwindows C:\Fenetre2_GTK_WIN.c -o C:\Fenetre2_GTK_WIN.exe -mms-bitfields -IC:/GTK+/include/gtk-2.0 -IC:/GTK+/lib/gtk-2.0/include -IC:/GTK+/include/atk-1.0 -IC:/GTK+/include/cairo -IC:/GTK+/include/gdk-pixbuf-2.0 -IC:/GTK+/include/pango-1.0 -IC:/GTK+/include/glib-2.0 -IC:/GTK+/lib/glib-2.0/include -IC:/GTK+/include -IC:/GTK+/include/freetype2 -IC:/GTK+/include/libpng14 -LC:/GTK+/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl
And after......
"Roll my hen" (French expression "Roule ma poule"

)
I run this code and the miracle come, i have a nice Linux GTK window in WINDOWS
The problem his for crosscompil a RASPBIAN window on WINDOWS (Surely bad jealousy

)
I use for that "gcc-linaro-arm-linux-gnueabihf-4.8-2013.11_win32" a crosscompiler
For compil a simple C code, without external library all are done, just write this in WINDOWS console
Code: Select all
C:\gcc-linaro-arm-linux-gnueabihf-4.8-2013.11_win32\bin\arm-linux-gnueabihf-gcc.exe C:\HelloWord.c -o C:\HelloWord_RASP
That generate a real LINUX executable and that works very simply and well
But the problem is for include an external big libray like GTK on my C code
when i do the same method of above, just replace the CGG compiler to the "arm-linux-gnueabihf-gcc.exe" compiler
Code: Select all
C:\arm-linux-gnueabihf-gcc.exe "C:\Fenetre1_GTK.c" -o "C:\Fenetre_GTK_NUX.nux" -IC:/gtk+-3.5.4-1-bundle/include/gtk-3.0 -IC:/gtk+-3.5.4-1-bundle/include/atk-1.0 -IC:/gtk+-3.5.4-1-bundle/include/cairo -IC:/gtk+-3.5.4-1-bundle/include/gdk-pixbuf-2.0 -IC:/gtk+-3.5.4-1-bundle/include/pango-1.0 -IC:/gtk+-3.5.4-1-bundle/include/glib-2.0 -IC:/gtk+-3.5.4-1-bundle/lib/glib-2.0/include -IC:/gtk+-3.5.4-1-bundle/include -IC:/gtk+-3.5.4-1-bundle/include/pixman-1 -IC:/gtk+-3.5.4-1-bundle/include/freetype2 -IC:/gtk+-3.5.4-1-bundle/include/libpng15 -Wl,-luuid -LC:/gtk+-3.5.4-1-bundle/lib -lgtk-3 -lgdk-3 -limm32 -lshell32 -lole32 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lfontconfig -lpango-1.0 -lm -lcairo -lgobject-2.0 -lglib-2.0 -lintl
That write thousand of error lines
WINDOWS console wrote:In file included from C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gal
loca.h:34,
from C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib.h:3
2,
from C:/gtk+-3.5.4-1-bundle/include/gtk-3.0/gdk/gdkco
nfig.h:13,
from C:/gtk+-3.5.4-1-bundle/include/gtk-3.0/gdk/gdk.h
:30,
from C:/gtk+-3.5.4-1-bundle/include/gtk-3.0/gtk/gtk.h
:30,
from C:\Fenetre1_GTK.c:3:
C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gtypes.h:476:33: warning:
return type defaults to 'int' [-Wimplicit-int]
# define GLIB_VAR extern __declspec(dllimport)
^~~~~~~~~~
C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gmem.h:276:1: note: in ex
pansion of macro 'GLIB_VAR'
GLIB_VAR gboolean g_mem_gc_friendly;
^~~~~~~~
In file included from C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gli
st.h:34,
from C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gha
sh.h:35,
from C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib.h:5
2,
from C:/gtk+-3.5.4-1-bundle/include/gtk-3.0/gdk/gdkco
nfig.h:13,
from C:/gtk+-3.5.4-1-bundle/include/gtk-3.0/gdk/gdk.h
:30,
from C:/gtk+-3.5.4-1-bundle/include/gtk-3.0/gtk/gtk.h
:30,
from C:\Fenetre1_GTK.c:3:
C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gmem.h: In function '__de
clspec':
C:/gtk+-3.5.4-1-bundle/include/glib-2.0/glib/gmem.h:280:10: error: exp
ected '=', ',', ';', 'asm' or '__attribute__' before 'GMemVTable'
GLIB_VAR GMemVTable *glib_mem_profiler_table;
^~~~~~~~~~
.........................
........................
etc ...thousands pages
And i not understand all of this text
