2
我有一个为我提供的以前的C++项目的解决方案。当我打开Visual Studio中的解决方案,并尝试建立,我得到的错误:用Visual Studio构建错误
1>------ Build started: Project: Test Proj, Configuration: Release Win32 ------
1>Build started 9/19/2011 8:28:56 PM.
1>InitializeBuildStatus:
1> Touching "Release\Test Proj.unsuccessfulbuild".
1>ClCompile:
1> example1.cpp
1>c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
1> InitShader.cpp
1>c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.85
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
我不得不改变我的项目输入连接器设置包括glew32d.lib。这解决了它,它编译和运行正常。
然而,当我改变example1.cpp(甚至只需添加评论),我不再能够构建它,我得到这个错误:
1>------ Build started: Project: Test Proj, Configuration: Release Win32 ------
1>Build started 9/19/2011 8:25:29 PM.
1>InitializeBuildStatus:
1> Creating "Release\Test Proj.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> example1.cpp
1>c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.67
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
glew32d仍然被链接所以我米不知道我在哪里得到的错误,为什么我不能建立
但是如果是这样的话,为什么我在更改链接设置后没有出现构建错误?编译的所有东西以及.exe都按照它应有的方式运行。为了答复,我要看看你现在说的话。 – y3di
好,所以我改变了包括到,并把一个glew.h文件我在互联网上的目录下。如果没有找到该文件,我仍然不明白为什么它会在之前构建。 –
y3di