I have 3 files in my program: App_interface.h, App_interface.cpp, main.cpp. Im trying to compile my program which requires the Qt library. I just installed the Qt library in the default location. This is my makefile:
if your wondering why i don't use moc in this makefile is because 1) i dont know how to do that. 2) i just want to stop getting the compiler error "cannot find ... file".
thanks
# Project: App_interface
# 10-19-09
#
# general variables
CPP := g++
OBJS := main.o App_interface.o
# Qt directorys
QTLIB := /usr/local/Trolltech/Qt-4.5.3/lib
QTINC := /usr/local/Trolltech/Qt-4.5.3/include
QTMOC := /usr/local/Trolltech/Qt-4.5.3/bin
App_interfaceV1: $(OBJS)
$(CPP) $(OBJS) -o App_interfaceV1 $(QTLIB)
main.o: main.cpp App_interface.h
$(CPP) -B $(QTINC) -c main.cpp -o main.o
App_interface.o: App_interface.h
$(CPP) -B $(QTINC) -c App_interface.cpp -o App_interface.o