Hello, I'm continuing with clang and gtk
Really simple indeed... :) I've downloaded these bundles : http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip and from http://llvm.org/releases/download.html : http://llvm.org/releases/3.1/clang+llvm-3.1-i386-mingw32-EXPERIMENTAL.tar.bz2 I've extracted these archives in /usr/local (or d:\cross-compile\mingw). ------------------------------- $ export CC=clang $ valac hello.vala $ hello Hello world ! $ valac --pkg gtk+-2.0 -X -lgtk-win32-2.0 gtk1.vala gtk+-2.0.vapi:5802.40-5802.42: warning: Gtk is deprecated. Use gtk+-3.0 gtk1.vala:6.5-6.7: warning: Gtk is deprecated. Use gtk+-3.0 gtk1.vala:13.29-13.31: warning: Gtk is deprecated. Use gtk+-3.0 gtk1.vala:23.5-23.7: warning: Gtk is deprecated. Use gtk+-3.0 Compilation succeeded - 4 warning(s) $ gtk1 ==> I've got an error : (..) you are using an unsupported compiler second try: $ export CC=gcc $ valac --pkg gtk+-2.0 -X -lgtk-win32-2.0 gtk1.vala gtk+-2.0.vapi:5802.40-5802.42: warning: Gtk is deprecated. Use gtk+-3.0 gtk1.vala:6.5-6.7: warning: Gtk is deprecated. Use gtk+-3.0 gtk1.vala:13.29-13.31: warning: Gtk is deprecated. Use gtk+-3.0 gtk1.vala:23.5-23.7: warning: Gtk is deprecated. Use gtk+-3.0 Compilation succeeded - 4 warning(s) $ gtk1 It's running ! $ valac --pkg gtk+-3.0 -X -lgtk-win32-2.0 gtk1.vala l:/programmation/gtk1.vala.c:11:21: fatal error: gtk/gtk.h: No such file or directory compilation terminated. error: cc exited with status 1 Compilation failed: 1 error(s), 0 warning(s) $ So... ehm.. I'll use --pkg gtk+-2.0 ^___^ (except if you have any idea :) ) Regards Raum ------------- GTK1.VALA --------------------- using Gtk; int main (string[] args) { Gtk.init (ref args); var window = new Window (); window.title = "First GTK+ Program"; window.border_width = 10; window.window_position = WindowPosition.CENTER; window.set_default_size (350, 70); window.destroy.connect (Gtk.main_quit); var button = new Button.with_label ("Click me!"); button.clicked.connect (() => { button.label = "Thank you"; }); window.add (button); window.show_all (); Gtk.main (); return 0; } -------------------------------------------- > > > Le 05/10/2012 22:25, Raum a écrit : >> Well, I'll provide an installation in the following directories : >> d:\cross-compile\mingw (linked to /usr/local) >> d:\cross-compile\msys (linked to /usr) >> >> At the end of the process, the files will occupied 250 MB >> >> Link to Mingw32 sourceforge : >> http://sourceforge.net/projects/mingw/files/ >> >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >> MSYS Installation MSYS >> >> Download the following packages >> bash-3.1.17-4-msys-1.0.16-bin >> bison-2.4.2-1-msys-1.0.13-bin >> coreutils-5.97-3-msys-1.0.13-bin >> diffutils-2.8.7.20071206cvs-3-msys-1.0.13-bin >> findutils-4.4.2-2-msys-1.0.13-bin >> flex-2.5.35-2-msys-1.0.13-bin >> gawk-3.1.7-2-msys-1.0.13-bin >> grep-2.5.4-2-msys-1.0.13-bin >> libiconv-1.13.1-2-msys-1.0.13-dll-2 >> libintl-0.17-2-msys-dll-8 >> libregex-1.20090805-2-msys-1.0.13-dll-1 >> libtermcap-0.20050421_1-2-msys-1.0.13-dll-0 >> m4-1.4.14-1-msys-1.0.13-bin >> make-3.81-3-msys-1.0.13-bin >> msysCORE-1.0.17-1-msys-1.0.17-bin >> msysCORE-1.0.17-1-msys-1.0.17-dev >> msysCORE-1.0.17-1-msys-1.0.17-ext >> msysCORE-1.0.17-1-msys-1.0.17-ext >> patch-2.6.1-1-msys-1.0.13-bin >> perl-5.6.1-MSYS-1.0.11 >> sed-4.2.1-2-msys-1.0.13-bin >> tar-1.23-1-msys-1.0.13-bin >> termcap-0.20050421_1-2-msys-1.0.13-bin >> texinfo-4.13a-2-msys-1.0.13-bin >> >> ==> decompress into d:\cross-compile\msys >> >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >> MingW and Vala installation >> >> Download from MingW32 : >> binutils-2.22-1-mingw32-bin >> gcc-c++-4.6.2-1-mingw32-bin >> gcc-core-4.6.2-1-mingw32-bin >> gettext-0.18.1.1-2-mingw32-bin >> gettext-0.18.1.1-2-mingw32-dev >> libexpat-2.0.1-1-mingw32-dll-1 >> libgcc-4.6.2-1-mingw32-dll-1 >> libgettextpo-0.18.1.1-2-mingw32-dll-0 >> libgmp-5.0.1-1-mingw32-dll-10 >> libiconv-1.14-2-mingw32-dev >> libiconv-1.14-2-mingw32-dll-2 >> libintl-0.18.1.1-2-mingw32-dll-8 >> libmpc-0.8.1-1-mingw32-dll-2 >> libmpfr-2.4.1-1-mingw32-dll-1 >> libstdc++-4.6.2-1-mingw32-dll-6 >> libz-1.2.7-1-mingw32-dev >> libz-1.2.7-1-mingw32-dll-1 >> mingwrt-3.20-mingw32-dev >> mingwrt-3.20-mingw32-dll >> pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev >> w32api-3.17-2-mingw32-dev >> >> Download libxml2 and iconv >> ftp://ftp.zlatkovic.com/libxml/iconv-1.9.2.win32.zip >> ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip >> >> And, at last, download from my site (http://linbox.free.fr/vala) >> vala-0.18.0-mingw32-bin.tar.xz (2,5 Mo) >> libgee-0.6.5-mingw32.tar.xz (0,5 Mo) >> libffi-3.0.11-mingw32-bin.tar.xz (61 Ko) >> glib-2.34.0-mingw32-bin.tar.xz (4,1 Mo) >> pkg-config-0.27.1-mingw32-bin.tar.xz (64 Ko) >> >> (DONT USE libxml2 FROM MY SITE) >> >> ==> Decompress into d:\cross-compile\mingw >> >> Move files from "d:\cross-compile\mingw\iconv-1.9.2.win32\" to >> "d:\cross-compile\mingw" >> Move files from "d:\cross-compile\mingw\libxml2-2.7.8.win32\" to >> "d:\cross-compile\mingw" >> Move files from "d:\cross-compile\mingw\mingwin32\" to >> "d:\cross-compile\mingw" >> >> Ok, now we need to configure some MSYS files >> >> Replace "D:\cross-compile\msys\etc\fstab" with these lines >> --------------------------------------- >> D:/cross-compile/mingw /usr/local >> d:/cross-compile/src /src >> d:/cross-compile/mingw/lib /mingw/lib >> --------------------------------------- >> >> >> Edit "D:\cross-compile\msys\etc\profile" >> Replace >> --------------------------------------- >> if [ $MSYSTEM == MINGW32 ]; then >> export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH" >> else >> export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH" >> fi >> --------------------------------------- >> by >> --------------------------------------- >> export PATH="/usr/bin:/bin:/d/utils:/usr/local/bin:." >> export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" >> export C_LIBRARY_PATH="/usr/include:/usr/local/include" >> export CPLUS_LIBRARY_PATH="/usr/lib:/usr/local/lib" >> --------------------------------------- >> >> Then launch msys.bat >> >> It seems to work but with a long program, which launches, it crashed >> when I tried something... Well I still look . >> >> If you have any information or comments, do not hesitate ... :) >> >> Some errors and how to resolv : >> --------------------------- >> Probleme : (compilation glib en fait) >> /bin/sh: line 19: python2.5: command not found >> Solution : >> export PYTHON=/d/Python2.5/python >> --------------------------- >> Probleme : >> d:/cross-compile/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../crt2.o: >> In function `_mingw_CRTStartup': >> C:\MinGW\msys\1.0\src\mingwrt/../mingw/crt1.c:193: undefined reference >> to `__dyn_tls_init_callback' >> collect2: ld returned 1 exit status >> error: cc exited with status 1 >> Solution: >> Le chemin vers PKG_CONFIG n'es tpas bon... >> export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" >> ---------------------------- >> >> Regards >> >> Raum >> >> _______________________________________________ >> vala-list mailing list >> [email protected] >> https://mail.gnome.org/mailman/listinfo/vala-list > > _______________________________________________ > vala-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/vala-list > _______________________________________________ vala-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/vala-list
