ImGui v1.60链接错误求助:OpenGL教程中遇未解析外部符号
OpenGL + ImGui 链接错误:151项未解析外部符号(LNK2019/LNK2001)
正在跟着OpenGL教程学习,进度到对应视频第8分钟时,编译项目出现151项和ImGui相关的链接错误,类型包括LNK2019、LNK2001未解析外部符号。我已经在代码里包含了ImGui对应的头文件,但搞不懂链接器报错的原因。
问题集中在这段ImGui代码:
{ static float f = 0.0f; static int counter = 0; ImGui::Text("Hello, world!"); // Display some text (you can use a format string too) ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state ImGui::Checkbox("Another Window", &show_another_window); if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated) counter++; ImGui::SameLine(); ImGui::Text("counter = %d", counter); ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); }
我已经准备好完整的Application.cpp文件、项目目录结构截图,以及部分链接错误输出。之前尝试调整Visual Studio的默认库忽略设置、修改C++编译版本,但错误情况反复出现,完全搞不清问题根源和正确的项目设置,求解决思路。
内容的提问来源于stack exchange,提问作者Chris
相关产品推荐
相关产品推荐

