I've got a GUI project (using Fast Light Toolkit) with the following components inside of it.
All of the headers and files listed here (note the Makefile.win)
http://www.stroustrup.com/Programming/Graphics/
and this is the file I'm trying to get to run.
#include "Simple_window.h" // get access to our window library
#include "Graph.h" // get access to our graphics library facilties
int main()
{
using namespace Graph_lib; // our graphics facilities are in Graph_lib
Point tl(100,100); // to become top left corner of window
Simple_window win(tl,600,400,"Canvas"); // make a simple window
Polygon poly; // make a shape (a polygon)
poly.add(Point(300,200)); // add point
poly.add(Point(350,100)); // add another point
poly.add(Point(400,200)); // add a third point
poly.set_color(Color::red); // adjust properties of poly
win.attach(poly); // connect poly to window
win.wait_for_button(); // give control to display engine
}
At first when I tried to compile I got an error saying
File: C:\Dev-Cpp\Makefile.win
Error: [Build Error] [Projectname.exe] Error 1
Then I went into project options and selected "Use custom makefile" selected the custom makefile from the website which is saved in my C++ folder (and is part of the project.)
When I did this I got
File: C:\Users\Alex\Makefile.win (this is a different makefile.win)
Error: [Build Error] No rule to make target 'c12_3.cpp'(the file I'm compiling)
needed by 'c12_3.o'. Stop.
I am using Dev-C++ as a compiler. If you need more information just let me know. I am pretty stuck.
The makefile.win from the site after being compiled looks like this.
# Project: Stroustrup
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES = Stroustrup_private.res
OBJ = Makefile.o ../Users/Alex/C++/ch12_3.o ../Users/Alex/C++/Graph.o ../Users/Alex/C++/GUI.o ../Users/Alex/C++/Simple_Window.o ../Users/Alex/C++/Window.o $(RES)
LINKOBJ = Makefile.o ../Users/Alex/C++/ch12_3.o ../Users/Alex/C++/Graph.o ../Users/Alex/C++/GUI.o ../Users/Alex/C++/Simple_Window.o ../Users/Alex/C++/Window.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -mwindows -lfltk -lole32 -luuid -lcomctl32 -lwsock32 -lm
INCS = -I"C:/Dev-Cpp/include"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
BIN = Stroustrup.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS) -DWIN32 -mms-bitfields
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before Stroustrup.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "Stroustrup.exe" $(LIBS)
Makefile.o: Makefile.win
$(CPP) -c Makefile.win -o Makefile.o $(CXXFLAGS)
../Users/Alex/C++/ch12_3.o: ../Users/Alex/C++/ch12_3.cpp
$(CPP) -c ../Users/Alex/C++/ch12_3.cpp -o ../Users/Alex/C++/ch12_3.o $(CXXFLAGS)
../Users/Alex/C++/Graph.o: ../Users/Alex/C++/Graph.cpp
$(CPP) -c ../Users/Alex/C++/Graph.cpp -o ../Users/Alex/C++/Graph.o $(CXXFLAGS)
../Users/Alex/C++/GUI.o: ../Users/Alex/C++/GUI.cpp
$(CPP) -c ../Users/Alex/C++/GUI.cpp -o ../Users/Alex/C++/GUI.o $(CXXFLAGS)
../Users/Alex/C++/Simple_Window.o: ../Users/Alex/C++/Simple_Window.cpp
$(CPP) -c ../Users/Alex/C++/Simple_Window.cpp -o ../Users/Alex/C++/Simple_Window.o $(CXXFLAGS)
../Users/Alex/C++/Window.o: ../Users/Alex/C++/Window.cpp
$(CPP) -c ../Users/Alex/C++/Window.cpp -o ../Users/Alex/C++/Window.o $(CXXFLAGS)
Stroustrup_private.res: Stroustrup_private.rc
$(WINDRES) -i Stroustrup_private.rc --input-format=rc -o Stroustrup_private.res -O coff