我正在编写游戏窗口部分的代码。代码出现了错误,我认为错误的原因是缺少 GLFW
库。我使用 Notepad++
进行编辑,MinGW
进行编译。我该如何将库安装到我的文件夹中?
错误信息:
NPP_SAVE: C:\Users\User\Desktop\game\src\main.cpp
CD: C:\Users\User\Desktop\game\src
Current directory: C:\Users\User\Desktop\game\src
g++ "main.cpp" -o main -march=native -O3
Process started (PID=1568) >>>
In file included from main.cpp:4:
Display.h:7:10: fatal error: GLFW/glfw3.h: No such file or directory
#include <GLFW/glfw3.h>
^~~~~~~~~~~~~~
compilation terminated.
<<< Process finished (PID=1568). (Exit code 1)
NPP_RUN: main
; executing: NPP_RUN main
- the specified file was not found
================ READY ================
GLFW
库的压缩文件添加到C:\MinGW\include
吗? - bapapg++ -l C:\Users\User\Desktop\game\Dependencies
,但出现了错误。 错误:c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot find -lC:\Users\User\Desktop\game\Dependencies
。 - bapap-l
adds a libary by name, as I said. It should be-lglfw3
- Lukas-T程序太大,无法放入内存
。我该如何解决这个问题?我是C++新手。 - bapap