函数_main(OPENGL C ++)中引用的未解析的外部符号_____________ [重复]

因此,我正在遵循有关C ++的OpenGL教程,并遵循了他所做的一切。我收到这些错误,但不知道如何解决。

Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol _glfwWindowShouldClose referenced in function _main  GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK1120 9 unresolved externals  GameEngine  C:\Users\Layne\source\repos\GameEngine\Debug\GameEngine.exe 1   
Warning LNK4272 library machine type 'x64' conflicts with target machine type 'x86' GameEngine  C:\Users\Layne\source\repos\GameEngine\Game Engine\GLFW\lib\glfw3.lib   1   
Error   LNK2019 unresolved external symbol _glfwCreateWindow referenced in function _main   GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwInit referenced in function _main   GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwMakeContextCurrent referenced in function _main GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwPollEvents referenced in function _main GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwSetFramebufferSizeCallback referenced in function _main GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwSwapBuffers referenced in function _main    GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwTerminate referenced in function _main  GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
Error   LNK2019 unresolved external symbol _glfwWindowHint referenced in function _main GameEngine  C:\Users\Layne\source\repos\GameEngine\GameEngine\main.obj  1   
评论
babay
babay

警告LNK4272库计算机类型'x64'与目标计算机类型'x86'游戏引擎冲突

听起来您的库是用64位构建的,但是您是用32位构建的?如果您使用的是Visual Studio,则可以在顶部进行更改。否则,请告知我们您正在开发的平台和IDE,并提供指向您正在遵循的教程的链接。

点赞
评论