Much like glib and gtk, gtkmm also has three constants; gtkmm_major_version, gtkmm_minor_version and gtkmm_micro_version. But when I try using these constants in my code, I get linkage errors.
gtk-2.8.1 is not in portage... what ebuild is this exactly about?
Just amended gtk-2.8.1 to gtkmm-2.8.1, sorry about that!!
Reopened with amended summary line.
can you attach example source + how you are attemping to compile/link it?
#include <gtkmm.h> #include <iostream> int main() { std::cout << "Gtkmm " << gtkmm_major_version << "." << gtkmm_minor_version << "." << gtkmm_micro_version << "\n"; return 0; } g++ `pkg-config --libs --cflags gtkmm-2.4` gtkmm_test.cpp -o gtkmm_test /tmp/ccZu58l0.o: In function `main': gtkmm_test.cpp:(.text+0x131): undefined reference to `gtkmm_major_version' gtkmm_test.cpp:(.text+0x154): undefined reference to `gtkmm_minor_version' gtkmm_test.cpp:(.text+0x177): undefined reference to `gtkmm_micro_version' collect2: ld returned 1 exit status
make those all capitals like: GTKMM_MAJOR_VERSION GTKMM_MINOR_VERSION GTKMM_MICRO_VERSION and you won't have those errors.
How strange - they're certainly lower case in /usr/include/gtkmm-2.4/gtkmm! But thank you, that's solved my problem.