The MSys2 GTK3 Packages I added; I added all of gtk3 recommend packages.
pacman -S mingw-w64-x86_64-gtk3 # It takes the installer a lot of time to search the fonts folder; just wait.
pacman -S mingw-w64-x86_64-gdk-pixbuf2
Patch file of the changes I needed to do to CB GTK Wizard; to make it work with GTK3 and Code::Blocks 13.12.
Tim S.
gtk/wizard.script | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gtk/wizard.script b/gtk/wizard.script
index 2843dfd..82cc326 100644
--- a/gtk/wizard.script
+++ b/gtk/wizard.script
@@ -54,14 +54,14 @@ function OnLeave_GtkPath(fwd)
local dir_nomacro_inc = GetCompilerIncludeDir(dir, GtkPathDefault, GtkPathDefaultInc);
if (dir_nomacro_inc.IsEmpty())
return false;
- if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T("gtk-2.0") + wxFILE_SEP_PATH +_T("gtk"), _T("gtk.h"), _T("GTK's include")))
+ if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T("gtk-3.0") + wxFILE_SEP_PATH +_T("gtk"), _T("gtk.h"), _T("GTK's include")))
return false;
// verify library dependencies
local dir_nomacro_lib = GetCompilerLibDir(dir, GtkPathDefault, GtkPathDefaultLib);
if (dir_nomacro_lib.IsEmpty())
return false;
- if (!VerifyLibFile(dir_nomacro_lib, _T("gtk-win32-2.0"), _T("GTK's")))
+ if (!VerifyLibFile(dir_nomacro_lib, _T("gtk-3.dll"), _T("GTK's")))
return false;
@@ -113,14 +113,14 @@ function SetupProject(project)
if (PLATFORM == PLATFORM_MSW)
{
project.AddIncludeDir(GtkPathDefaultInc);
- project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("gtk-2.0"));
+ project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("gtk-3.0"));
project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("cairo"));
project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("gdk"));
project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("glib-2.0"));
// Notice GtkPathDefault*Lib* at some positions. This is correct as of 2.8.20
project.AddIncludeDir(GtkPathDefaultLib + wxFILE_SEP_PATH + _T("glib-2.0") + wxFILE_SEP_PATH + _T("include"));
project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("pango-1.0"));
- project.AddIncludeDir(GtkPathDefaultLib + wxFILE_SEP_PATH + _T("gtk-2.0") + wxFILE_SEP_PATH + _T("include"));
+ project.AddIncludeDir(GtkPathDefaultLib + wxFILE_SEP_PATH + _T("gtk-3.0") + wxFILE_SEP_PATH + _T("include"));
project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("atk-1.0"));
if ( IO.DirectoryExists(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("gdk-pixbuf-2.0")) )
project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T("gdk-pixbuf-2.0"));
@@ -128,7 +128,7 @@ function SetupProject(project)
project.AddLibDir(GtkPathDefaultLib);
// add link libraries
- project.AddLinkLib(_T("gtk-win32-2.0"));
+ project.AddLinkLib(_T("gtk-3"));
project.AddLinkLib(_T("gobject-2.0"));
project.AddLinkLib(_T("glib-2.0"));
Can you record a video of this behaviour?
I can probably get some screenshots, but that's about the best I can do. I don't have any sort of video capture software on my laptop.
edit: I went in to try to get the screenshots, and the behavior isn't replicating today.
As it stands, I can get a blank window to open from the tutorial code from the gtk website: http://www.gtk.org/tutorial1.2/gtk_tut-2.html (http://www.gtk.org/tutorial1.2/gtk_tut-2.html)
(I posted the link to the location where I got the code rather than post the code itself to save space. I copy/pasted the code verbatim fro that tutorial
When working on the hello world sample on the same page, I get 17 errors and 4 warnings:
||=== Build: Debug in newgtk (compiler: GNU GCC Compiler) ===|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c||In function 'main':|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|57|warning: implicit declaration of function 'gtk_signal_connect' [-Wimplicit-function-declaration]|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|57|warning: implicit declaration of function 'GTK_OBJECT' [-Wimplicit-function-declaration]|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|58|warning: implicit declaration of function 'GTK_SIGNAL_FUNC' [-Wimplicit-function-declaration]|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|81|warning: implicit declaration of function 'gtk_signal_connect_object' [-Wimplicit-function-declaration]|
obj\Debug\main.o||In function `hello':|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|10|undefined reference to `g_print'|
obj\Debug\main.o||In function `delete_event':|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|23|undefined reference to `g_print'|
obj\Debug\main.o||In function `main':|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|57|undefined reference to `GTK_SIGNAL_FUNC'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|57|undefined reference to `GTK_OBJECT'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|57|undefined reference to `gtk_signal_connect'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|63|undefined reference to `GTK_SIGNAL_FUNC'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|63|undefined reference to `GTK_OBJECT'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|63|undefined reference to `gtk_signal_connect'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|67|undefined reference to `g_type_check_instance_cast'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|75|undefined reference to `GTK_SIGNAL_FUNC'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|75|undefined reference to `GTK_OBJECT'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|75|undefined reference to `gtk_signal_connect'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|81|undefined reference to `GTK_OBJECT'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|81|undefined reference to `GTK_SIGNAL_FUNC'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|81|undefined reference to `GTK_OBJECT'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|81|undefined reference to `gtk_signal_connect_object'|
C:\Users\Will\Documents\learning\C++\misc\newgtk\main.c|86|undefined reference to `g_type_check_instance_cast'|
||=== Build failed: 17 error(s), 4 warning(s) (0 minute(s), 1 second(s)) ===|
While I'm not exactly an expert with GTK+, I do know that the g_print() function is a part of the Glib library (Glib is a dependency of GTK). I added an include for glib.h, and it still came up the same .