|
From: | Jamiil Abduqadir |
Subject: | My first Makefile HELP!! |
Date: | Wed, 14 Mar 2007 14:04:52 -0400 |
I wrote this simple Makefile, which by the way is
my first Makefile, it is a test Makefile to make sure that everyting
works. The
helloworld.??p and the main.cpp are copy/pasted from the Gtkmm-2.4-manual's book; so, I would say that they can be trusted.
And here is copy of my Makefile.jme
# Makefile
# Pogrammer:
# Date:
# Version:
# Description:
# Variables
#~~~~~~~~~~
# Compiler name
CPP=g++
# Executable
EXEC=Jaime
# Flagas
CFLAGS= -Wall -ggdb3
#Libraries
GTKmm_LIBS=`pkg-config gtkmm-2.4 --cflags --libs`
#Local Variables
OBJS = main.o helloworld.o
#Application name
my_app: $(OBJS)
$(CPP) $(LDLIBS) $(OBJS) -o $(EXEC) $(GTKmm_LIBS)
main.o: main.cpp
$(CPP) $(CFLAGS) -c main.cpp
helloworld.o: helloworld.hpp
$(CPP) $(CFLAGS) -c helloworld.cpp
# Remove the following files
clean:
rm -f $(OBJS)
rm -f $(EXEC)
rm -f *.*~
PHONY: clean
This is the error I get:g++ -Wall -ggdb3 -c main.cpp
main.cpp:1:24: gtkmm/main.h: No such file or directory
In file included from
main.cpp:2:
helloworld.hpp:4:26: gtkmm/button.h: No such file or directory
helloworld.hpp:5:26: gtkmm/window.h: No such file or directory
In file included from main.cpp:2:
helloworld.hpp:7: error: `Gtk' is not a class or namespace
helloworld.hpp:8: error: `Window' is not a class or namespace
helloworld.hpp:8: error: invalid base-class specification
helloworld.hpp:19: error: syntax error before `::' token
main.cpp: In function `int main(int, char**)':
main.cpp:6: error: `Gtk' undeclared (first use this function)
main.cpp:6: error: (Each undeclared identifier is reported only once
for each
function it appears in.)
main.cpp:6: error: parse error before `::' token
main.cpp:9: error: parse error before `::' token
main.cpp:12:2: warning: no newline at end of file
make: *** [main.o] Error 1
----------------------
It looks as if cannot find the gtkmm library, however, when I type "# pkg-config gtkmm-2.4 --cflags" I get "-DXTHREADS -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0"
"# pkg-config gtkmm-2.4 --libs" also provides the right data, so... is nto that I don't have the libraries installed.
What am I doing wrong?
T.I.A.
[Prev in Thread] | Current Thread | [Next in Thread] |