【发布时间】:2014-06-17 13:30:33
【问题描述】:
Error: cannot open source file "GL/glew.h"
我有以下代码:
//Include GLEW
#include <GL/glew.h>
//Include GLFW
#include <GLFW/glfw3.h>
//Include the standard C++ headers
#include <stdio.h>
#include <stdlib.h>
//Define an error callback
static void error_callback(int error, const char* description)
{
...
为了有一个可移植的解决方案,在我启动 Visual Studio 2013 之前,我在 windows 中创建了两个系统环境变量。
GLEW=C:\Install\Development\C++\Framework\glew-1.10.0-win32\glew-1.10.0
GLFW=C:\Install\Development\C++\Framework\glfw-3.0.4.bin.WIN32\glfw-3.0.4.bin.WIN32
所以在我的项目中,例如我可以编写一个额外的包含文件夹:%GLEW%\include
正如我所说,它构建良好并且运行良好。
然而,智能感知行为不正常确实很烦人。 如何解决?
【问题讨论】:
-
什么...是......IDE...错误?请使用该信息编辑您的帖子。
-
对,我最终忘记了主要信息......
-
您可能想要创建项目变量而不是环境变量,例如stackoverflow.com/questions/4249844/…
标签: c++ visual-studio-2013 intellisense glew