Author Topic: can't build GTK+ project  (Read 5391 times)

Offline mbaker

  • Single posting newcomer
  • *
  • Posts: 3
can't build GTK+ project
« on: July 15, 2009, 12:15:39 am »
I can't successfully build a GTK+ project. It WAS working, but now when I hit Re-build, this is outputted, and it fails to make the exe.

-------------- Build: Release in gui2 ---------------

Compiling: main.c
mingw32-gcc.exe: Files/Common: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/include/gtk-2.0: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/lib/gtk-2.0/include: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/include/atk-1.0: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/include/cairo: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/include/pango-1.0: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/include/glib-2.0: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/lib/glib-2.0/include: No such file or directory
mingw32-gcc.exe: Files/GTK/2.0/include/libpng12: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

Here are my project-specific search directories
Compiler:
D:\Program Files\Common Files\GTK\2.0\include
D:\Program Files\Common Files\GTK\2.0\include\gtk-2.0
D:\Program Files\Common Files\GTK\2.0\include\cairo
D:\Program Files\Common Files\GTK\2.0\include\gdk
D:\Program Files\Common Files\GTK\2.0\include\glib-2.0
D:\Program Files\Common Files\GTK\2.0\lib\glib-2.0\include
D:\Program Files\Common Files\GTK\2.0\include\pango-1.0
D:\Program Files\Common Files\GTK\2.0\lib\gtk-2.0\include
D:\Program Files\Common Files\GTK\2.0\include\atk-1.0
Linker:
D:\Program Files\Common Files\GTK\2.0\lib
Link libraries:
gtk-win32-2.0
gobject-2.0
glib-2.0

Global search directories:
Compiler:
D:\MinGW\include
D:\MinGW\lib\gcc\mingw32\4.4.0\include
D:\MinGW\lib\gcc\mingw32\4.4.0\include\c++
Linker:
D:\MinGW\lib
D:\MinGW\lib\gcc\mingw32\4.4.0

Thank you for your assistance

Michael L. Baker

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: can't build GTK+ project
« Reply #1 on: July 15, 2009, 09:41:49 am »
A little less information (C::B-version, OS, MinGW-version).
Nevertheless it seemsto be a quoting problem.

So the most interesting question is: which version of C::B do you use ?

Offline mbaker

  • Single posting newcomer
  • *
  • Posts: 3
Re: can't build GTK+ project
« Reply #2 on: July 16, 2009, 12:46:10 am »
Code::Blocks 8.02, Windows XP, MinGW 4.4.0
Interestingly enough, if I hit Build instead of re-build, there are no errors and it works fine.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: can't build GTK+ project
« Reply #3 on: July 16, 2009, 12:55:49 pm »
You can post the full commandline, if you want, but I'm quite sure that I found the problem:

The include dirs get quoted (because of the spaces), but the last character is a backslash (when added via the dialog) and so it escapes the last quote of the include-statement. I think we should remove it (the last backslash) to avoid such misbehaviour, or use forward-slashes instead, gcc accepts them, but I think on windows we should use the native path-seperators.

You can try if that's the cause, by manually removing the trailing backslashes.


Offline mbaker

  • Single posting newcomer
  • *
  • Posts: 3
Re: can't build GTK+ project
« Reply #4 on: July 16, 2009, 07:13:04 pm »
I have not tried your advice yet, but the search directories I posted above did not include trailing backslashes. If C::B automatically appends a trailing backslash to all the search directories, and this causes an accidental quote escape, I believe that qualifies as a bug. In addition, I was receiving "not found" errors for directories that I didn't specify in the search directories, which leads me to suspect that maybe "gtk-config" is yielding malformed paths to the compiler. What do you think?