User forums > Using Code::Blocks
linking GTK with codeblocks?
southernsontn:
I am just learning c++, and up till now, the only code I have written has been console applications. I figured I would play around with the GTK project wizard to get a feel for it, but I can't figure out how to link codeblocks to the gtk library.
Following the instructions on the GTK download page, I installed msys2. I have no idea how to compile a pkgbuild, or what files are necessary, so I used pacman -S to download the GTK unico engine, but that didn't work, so I have started downloading every package they have under pacman -Ss gtk3.
The gtk.h file is located in "C:\msys64\mingw64\include\gtk-3.0\gtk"
Codeblocks says that it can't find an include file, which is correct, because there isn't one. I try to point the project wizard to "C:\msys64\mingw64", which is the parent directory of the include file, but then it says that it can't locate gtk.h
I apologize in advance if this is due to some failure to download the right package, but any help would be greatly appreciated.
I am running:
Windows Vista 64 bit
Codeblocks 13.12
MSYS2
and the GTK version that MSYS is trying to download is apparently GTK 3.0
stahta01:
Post the link to the directions you are following.
Note: Your question will likely drift off topic for this site.
I edit this post or pm you a link to another site if that happens.
Are you using Windows 32 bit or Windows 64 bit? Windows Vista 64 bit
Edit2: I will be using Code::Blocks 15.12RC1 on Windows 7 (either 32 bit or 64 bit)
Tim S.
--- Quote from: southernsontn on January 04, 2016, 07:00:18 pm ---I am just learning c++, and up till now, the only code I have written has been console applications. I figured I would play around with the GTK project wizard to get a feel for it, but I can't figure out how to link codeblocks to the gtk library.
Following the instructions on the GTK download page, I installed msys2. I have no idea how to compile a pkgbuild, or what files are necessary, so I used pacman -S to download the GTK unico engine, but that didn't work, so I have started downloading every package they have under pacman -Ss gtk3.
The gtk.h file is located in "C:\msys64\mingw64\include\gtk-3.0\gtk"
Codeblocks says that it can't find an include file, which is correct, because there isn't one. I try to point the project wizard to "C:\msys64\mingw64", which is the parent directory of the include file, but then it says that it can't locate gtk.h
I apologize in advance if this is due to some failure to download the right package, but any help would be greatly appreciated.
I am running:
Windows Vista 64 bit
Codeblocks 13.12
MSYS2
and the GTK version that MSYS is trying to download is apparently GTK 3.0
--- End quote ---
southernsontn:
Well, the GTK windows download site gives this link for instructions on installing GTK, but those directions are are focused on programming with Gedit, apparently. I want to install gtk for use with codeblocks.
https://blogs.gnome.org/nacho/2014/08/01/how-to-build-your-gtk-application-on-windows/
The blog website also give some directions for compiling GTK for use with visual C++, but I'm honestly not sure how relevant to code blocks those directions will be.
https://wiki.gnome.org/action/show/Projects/GTK+/Win32/MSVCCompilationOfGTKStack#The_Dependencies
At this point, I really don't want to go around pointlessly downloading things that I really don't need, since I've already downloaded god only knows how much trying to get this running. I know that at some point I will try to use a program I built on another computer and I would hate to have to download 7 or 8 GB of content just to run a 100 mb program...
stahta01:
Are you planning on using gtk2 or gtk3?
If it makes no difference I will use gtk2.
Tim S.
southernsontn:
well, I am planning to use GTK3, but when installing everything with msys2, apparently it installed both GTK3 and GTK2. As this point, I have no preference as long as I get something running correctly.
Navigation
[0] Message Index
[#] Next page
Go to full version