GUI 프로젝트 (Fast Light Toolkit 사용)에 다음 구성 요소가 포함되어 있습니다.Build Error Makefile.win FLTK
여기에 나열된 헤더 파일의 모든합니다 (Makefile.win주의)
http://www.stroustrup.com/Programming/Graphics/
이 내가 실행 얻기 위해 노력하고있어 파일입니다. 내가
File: C:\Dev-Cpp\Makefile.win
Error: [Build Error] [Projectname.exe] Error 1
가 그럼 난 프로젝트 옵션에 가서 선택 없다는 오류를 가지고 컴파일하려고 할 때
#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
}
은 처음에는 "메이크 사용자 정의 사용"에 저장되어있는 웹 사이트에서 사용자 지정 메이크 파일을 선택 내 C++ 폴더 (및 프로젝트의 일부입니다.)
내가
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.
있어 이런 짓을 할 때Dev-C++을 컴파일러로 사용하고 있습니다. 더 많은 정보가 필요하시면 알려주세요. 나는 꽤 붙어있다.
컴파일 후 사이트의 makefile.win은 다음과 같습니다.
# 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
나는 사이트에서 파일을 다운로드했습니다. 나는 내가 게시 한 첫 번째 파일을 제외하고는이 파일을 쓰지 않았다. – trikker
아마도 다른 강사/교과서를 받아야 할 것입니다. 이것은 당신을 어둡고 무서운 길로 인도하고있는 것 같습니다. 예를 들어, Qt는 FLTK보다 더 간단하고 더 많은 크로스 플랫폼입니다. 그리고 여러분이받은 makefile은 매우 휴대하기 어렵고 깨지기 쉽습니다. –
글은 Bjarne Stroustrup의 새로운 책입니다. 그것은 단지 몇 장을위한 GUI를 다룹니다. 파일을 잘못 정리했거나 잘못 처리 한 것 같습니다. 불행히도이 책과 사이트는 FLTK가 "모든 IDE가 크게 달라지기 때문에"FLTK를 작동시키는 데 필요한 지침서를 전혀 제공하지 않습니다. – trikker