Hello everyone. First and foremost, let me say that I'm fairly new to Code::Blocks and to C/C++ programming in general. This is probably a noob question.
I'm on Linux trying to use cb 12.11 to compile a C++ program that's available open source, just to get my feet wet with a large project (I've done small standalone projects in the past). This program uses multiple external static linked libraries. Now, every time I try to compile the program the compiler complains it can't find a header file for an external library. So, I track down the header file on my system, put the path in the 'Search Directories' section of my Build Options window and try compilation again. But then that dependency has another dependency that defines another header file and I have to enter that one into the 'Search Directories' section again. This process continues over and over again ad nauseum. I suppose I could end up spending a week compiling, tracing and entering file paths into the build options, but I'm hoping there's a better way. Like I said, I'm new to this so hopefully there's something I'm missing.
Example (not real but the jist of what I'm experiencing):
(Compile)
source.cpp has [i]#include <gtk/gtk.h>[/i]
Compile error: can't find gtk.h -> locate gtk.h -> put /usr/include/gtk-2.0/ into 'Search Directories'
(Compile)
gtk.h has [i]#include <gio/gio.h>[/i]
Compile error: can't find gio.h -> locate gio.h -> put /usr/include/glib-2.0/ into 'Search Directories'
(Compile)
gio.h has [i]#include <glibconfig.h>[/i]
Compile error: can't find glibconfig.h -> locate glibconfig.h -> put /usr/include/glib-2.0/include/ into 'Search Directories'
etc....
Note, these are all dependent but "standard" libraries. Also, I've already made sure /usr/include/ is in the Search Directories. I've seen posts on this forum that say recursive linking is bad and I can understand why but there's just got to be a better way to tell cb (and the compiler/linker for that matter) where all these nested dependent libraries are. Can anyone tell me how to properly set up my project so it finds these libraries on its own? Thanks for reading my long post.