這個代碼位I從這個tutorialLNK2019:解析的外部符號_glfwInit在函數引用_main
#include <stdio.h>
#include <stdlib.h>
#include <GL/glew.h>
#include <GL/glfw.h>
#include <glm/glm.hpp>
#include "Test2.h"
using namespace glm;
int main()
{
if(!glfwInit())
{
fprintf(stderr, "Failed to initialize GLFW\n");
return - 1;
}
}
隨後它產生一個錯誤:LNK2019:解析的外部符號_glfwInit在函數引用_main
我我使用VC++ 2008.我從glfw的官方站點下載了glfw-2.7.6.bin.WIN32.zip,將dll從名爲lib-msvc90的文件夾複製到了system32,並將lib複製到了Microsoft SDK。我錯過了任何一步?
您是否還將該庫添加到鏈接器定義中? – datenwolf