Qt创建者添加外部库(仍然:无法打开包含文件:“ GL / glew.h”) [英] Qt creator Adding external library (still: Cannot open include file: 'GL/glew.h')

查看:253
本文介绍了Qt创建者添加外部库(仍然:无法打开包含文件:“ GL / glew.h”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照说明进行操作:


  1. 在项目窗格中,打开项目文件(.pro)。

  2. 右键单击代码编辑器以打开上下文菜单,然后选择添加库...。

然后将以下行添加到了pro中文件:

Then the following lines were added into the pro file:

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/D:/OpenGL/glew-1.5.4/lib/ -lglew32
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/D:/OpenGL/glew-1.5.4/lib/ -lglew32d

INCLUDEPATH += $$PWD/D:/OpenGL/glew-1.5.4/include
DEPENDPATH += $$PWD/D:/OpenGL/glew-1.5.4/include

但是,我单击左下方的绿色三角形图标运行程序,仍然得到错误:

However, I click the green triangle icon on the bottom left the run the program, still get the errors:


错误:C1083:无法打开包含文件:'GL / glew.h':没有此类文件或目录

error: C1083: Cannot open include file: 'GL/glew.h': No such file or directory


推荐答案

我遇到了同样的问题,但我刚刚发现了这个问题:
必须运行qmake(build-> run qmake)来验证pro文件中的更改。

I had the same problem and I figured it out just now: You have to run qmake(build->run qmake) to validate changes in the pro file.

这篇关于Qt创建者添加外部库(仍然:无法打开包含文件:“ GL / glew.h”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆