1

I'm following this tutorial on how to set up a GTK+ project on Code::Blocks 16.01. The link in Step 1 to download GTK+ doesn't work, so I instead did a "Open in Desktop" from the Gtk Github repository. When doing Step 3 and giving the path for the location GTK, I get this error:

The path you entered seems valid, but the wizard can't locate the include directory. The wizard cannot continue.

When I look back at the repository, I see there is no "include" or "lib" subfolder that is needed to make the project. What can I do to setup the project if neither of those folders exist? I realize the tutorial was written in 2013, so maybe it's outdated. There is a 2015 YouTube tutorial about setting this up, but it seems more complicated with setting up environment variables and changing Code::Blocks "Global Compiler Settings", so I was wondering if this 2013 tutorial still works.

DragonautX
  • 860
  • 1
  • 12
  • 22
  • I would be very skeptical towards any approach that requires you to *build* GTK+ yourself just to use it. That's not normal, it's a library product, "someone else" should build it for you and you should get binaries and headers. – unwind Oct 12 '16 at 13:08
  • @unwind, the tutorial wasn't saying to build GTK+. It was saying to build your project using GTK+. – oldtechaa Oct 12 '16 at 13:15

1 Answers1

2

That tutorial has a lot of outdated info in it. It recommends GTK+2, GTK+ is now at version 3, moving on to 4, and you'll probably want to follow GTK's methods for installing and setting up instead of orienting yourself around Code::Blocks.

My recommendation would be to follow the GTK+ download instructions and the instructions on how to set it up and maybe these instructions on how to start, then begin making it work with Code::Blocks (for which you probably need to look at this question).

Also, with how much work it takes to set up Code::Blocks for GTK+3 anyway, you may consider using a different IDE.

Community
  • 1
  • 1
oldtechaa
  • 1,463
  • 1
  • 14
  • 26
  • I can try a different IDE. I'm just interested in trying out GTK. The GTK download page references Visual Studio, but what IDE have you used that works? Overall, I still want to try following the instructions you linked me. Do you know how to create a PKGBUILD file in Windows? There's a github link to it in the instructions, but I don't know what to save the raw file as. – DragonautX Oct 11 '16 at 20:51
  • I'll try Glade from this [SO](http://stackoverflow.com/questions/2894655/what-are-the-ides-available-for-gtk-development) post, looks pretty friendly. – DragonautX Oct 11 '16 at 21:08
  • Glade works _if you're building your GUI statically_ (that is, not making your widgets and things in your code, but creating a widget layout description you then load into your project). For actual code to use that description file, though, I don't think Glade allows code-editing. You'll probably still need an IDE. I like [Geany](http://geany.org/). As for the PKGBUILD, that will come later. – oldtechaa Oct 12 '16 at 03:01
  • I'll work more on it tomorrow, but do you have any experience with Linux, especially Arch? MSYS2 uses similar methods. Also, I can tell you you shouldn't need a PKGBUILD just for your beginning development. – oldtechaa Oct 12 '16 at 03:07
  • Oh I didn't know that. Alright, I'll look into Geany. I've had very little Linux experience, and no Arch. Coincidentally, I tried out Ubuntu on VMware yesterday. If it involves the terminal, I think I can work my way with it. – DragonautX Oct 12 '16 at 03:12
  • You're right. I'm just starting with Gtk's [Getting Started](https://developer.gnome.org/gtk3/stable/gtk-getting-started.html), I don't need something like PKGBUILD. But I still want to try to make an exmaple file from there work with PKGBUILD, it'd be cool to know. It sounds like a low-level way to compile and run a program. – DragonautX Oct 12 '16 at 04:10
  • Trying Geany, I thought it'd have gtk preinstalled or something like that, but trying to compile "example-0.c" from the "Getting Started" I mentioned earlier didn't work. I did some more searching, and found [this](http://www.tarnyko.net/en/?q=node/44). It worked out nicely, after guessing from [here](http://stackoverflow.com/questions/28735086/cannot-run-python-on-windows-what-am-i-missing) that I needed to add `C:\MinGW\bin` to PATH. I still want to use your link. Never did something like this before. I've done a little Python Tkinter before, and I thought this'd be fun to try. – DragonautX Oct 12 '16 at 11:41
  • 1
    Well, in that link is a link to Archwiki's PKGBUILD page and a sample PKGBUILD. You can look at those for some inspiration on that. That would be good if you were actually building a major project on Windows, but could work on a starting project. If your main problem is solved, you can mark it as an accepted answer, I guess. – oldtechaa Oct 12 '16 at 13:11
  • 1
    I also didn't notice your question about how to save a PKGBUILD. You can save files without extensions in Windows too, just like you could in Linux. It should be named just "PKGBUILD". – oldtechaa Oct 12 '16 at 20:06
  • sorry I accidentally clicked the "move to chat" link. Anyways, thanks. If I have any more questions about it, I'll ask it in another question. – DragonautX Oct 12 '16 at 20:46