我刚刚在Windows 7启动器上安装了DEV-C,并成功编译了一个小型c ++程序来读取图像文件,然后在窗口中显示它。我正在使用SFML。
我已将这些引用包含在项目目录中: SFML-2.3.2 \包括 SFML-2.3.2 \ lib中
然而,它不会链接。这是编译日志。这对我来说有点难以理解,因为我还在学习如何使用它。
COMPILE LOG: vbrowse1.o:vbrowse1.cpp :(。text $ _ZN2sf6SpriteD1Ev [__ ZN2sf6SpriteD1Ev] + 0x5e):未定义引用`_imp ___ ZN2sf13TransformableD2Ev'
这是制作文件:
# Project: vbrowse
# Makefile created by Dev-C++ 5.11
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
OBJ = vbrowse1.o
LINKOBJ = vbrowse1.o
LIBS = -L"C:/Program Files/Dev-Cpp/MinGW64/lib32" -L"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -L"C:/SFML-2.3.2/lib" -mwindows -m32
INCS = -I"C:/Program Files/Dev-Cpp/MinGW64/include" -I"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/SFML-2.3.2/include"
CXXINCS = -I"C:/Program Files/Dev-Cpp/MinGW64/include" -I"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++" -I"C:/SFML-2.3.2/include"
BIN = vbrowse.exe
CXXFLAGS = $(CXXINCS) -m32
CFLAGS = $(INCS) -m32
RM = rm.exe -f
.PHONY: all all-before all-after clean clean-custom
all: all-before $(BIN) all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)
vbrowse1.o: vbrowse1.cpp
$(CPP) -c vbrowse1.cpp -o vbrowse1.o $(CXXFLAGS)
C:\eyeball\vbrowse\Makefile.win:25: recipe for target 'vbrowse.exe' failed
mingw32-make.exe: *** [vbrowse.exe] Error 1
有人能发现问题吗? 感谢。