0
因此,在main.cpp中我有:的OpenGL在Visual Studio中不能使用清晰的彩色
#include <iostream>
#include "SRC\Graphics\Headers\MakeWindow.h"
int main()
{
if (!glfwInit())
{
std::cout << "Failed to open GLFW" << std::endl;
std::cin.get();
return -1;
}
std::cin.get();
char name_LOL[10] = "Hi There";
ENGINEG::Make_Window MyWindow(250, 500, name_LOL);
if (MyWindow.Is_Closed())
{
std::cout << "Failed to open window" << std::endl;
std::cin.get();
return -1;
}
glClearColor(0.2f, 0.3f, 0.8f, 1.0f);
MyWindow.Set_Window();
while (true)
{
glClear(GL_COLOR_BUFFER_BIT);
glfwPollEvents();
MyWindow.Update();
}
std::cin.get();
MyWindow.Colose_Window();
if (!MyWindow.Is_Closed())
{
std::cout << "Failed to close window" << std::endl;
std::cin.get();
return -1;
}
std::cin.get();
glfwTerminate();
std::cout << "Done!" << std::endl;
std::cin.get();
return 0;
}
在Makewindow.h GLFW是進口的,爲此OpenGL的應,但我仍然在使用的OpenGL得到這個錯誤功能。
錯誤LNK2019解析的外部符號__imp__glClearColor @ 16函數引用_main Game_Engine
標題和庫是完全不同的東西。你是否爲鏈接器添加了所需的庫? –