I'm trying to use my first make file, and it's my first program with gtkmm....
But I think I'm doing something wrong. I made my configure.ac file, here it is:
Code:
AC_INIT(src/firstwindow.cpp)
AM_INIT_AUTOMAKE(firstwindow,0.1)
AC_PROG_CC
AC_PROG_CXX
PKG_CHECK_MODULES([MYAPP], [gtkmm-2.4 >= 2.8.0])
AC_PROG_INSTALL
AC_OUTPUT(Makefile src/Makefile)
But if I then run aclocal, it has a problem with the PKG_CHECK_MODULES line for the GTK.
It prints out:
Code:
aclocal
/usr/share/aclocal/gtkgl.m4:4: warning: underquoted definition of AM_PATH_GTKGL
/usr/share/aclocal/gtkgl.m4:4: run info '(automake)Extending aclocal'
/usr/share/aclocal/gtkgl.m4:4: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
Am I not even supposed to use aclocal? Ive never used a make file before, so I was just trying to follow the instructions...
The program DOES fail to compile later because it isn't using the GTK library... so that's probably the problem.
It says:
Code:
make
Making all in src
make[1]: Entering directory `/home/violagirl23/programs/firstwindow/src'
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"firstwindow\" -DVERSION=\"0.1\" -I. -g -O2 -MT firstwindow.o -MD -MP -MF .deps/firstwindow.Tpo -c -o firstwindow.o firstwindow.cpp
firstwindow.cpp:1:19: error: gtkmm.h: No such file or directory
firstwindow.cpp: In function ‘int main(int, char**)’:
firstwindow.cpp:5: error: ‘Gtk’ has not been declared
firstwindow.cpp:5: error: expected `;' before ‘kit’
firstwindow.cpp:6: error: ‘Gtk’ has not been declared
firstwindow.cpp:6: error: expected `;' before ‘window’
firstwindow.cpp:7: error: ‘Gtk’ has not been declared
firstwindow.cpp:7: error: ‘window’ was not declared in this scope
make[1]: *** [firstwindow.o] Error 1
make[1]: Leaving directory `/home/violagirl23/programs/firstwindow/src'
make: *** [all-recursive] Error 1
Eep! I KNOW I have gtkmm, I got it to compile with just g++ like this:
Code:
g++ `pkg-config gtkmm-2.4 --cflags --libs`'
So what could be the problem here?