项目文件名:CreateWindow.h,Cube.h,Events.h,Graphics.h,Main.cpp
编译我的SDL项目时,我得到了链接器错误。这是输出:
1>------ Build started: Project: Engine, Configuration: Debug Win32 ------
1>Main.cpp
1>Debug\Main.obj : warning LNK4042: object specified more than once; extras ignored
1> Creating library M:\Engine\Project1\Debug\Engine.lib and object M:\Engine\Project1\Debug\Engine.exp
1>Main.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "void __cdecl Cube(void)" (?Cube@@YAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function "void __cdecl Cube(void)" (?Cube@@YAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function "void __cdecl Cube(void)" (?Cube@@YAXXZ)
1>M:\Engine\Project1\Debug\Engine.exe : fatal error LNK1120: 3 unresolved externals
1>Done building project "Project1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========