我试图编译一个GLSL程序,但是它显示了这个错误。
warning C4627: '#include "Angel.h"': skipped when looking for precompiled header use
Add directive to 'stdafx.h' or rebuild precompiled header
fatal error C1010: unexpected end of file while looking for precompiled header. Did you
forget to add '#include "stdafx.h"' to your source但实际上,我已经包含了stdafx.h,并且我使用Visual 2012创建了带有预编译头的项目。
#include "stdafx.h"
#include "Angel.h"
const int NumPoints = 5000;
//----------------------------------------------------------------------------
void
init( void )
{
vec2 points[NumPoints];
...发布于 2013-09-17 15:01:45
我认为您需要转到项目属性页-> C/C++ ->预编译头->,将Precompiled Header从Use(/Yu)转到Not using precompiled headers。
发布于 2013-09-18 08:27:07
抱歉,但这真的很有趣。无论如何,GLSL都不能用C/C++编译器编译-- GLSL编译器内置于OpenGL驱动程序中,并且它的内部没有公开。您必须向OpenGL提供源代码(以文本形式),它每次自己都会编译它。
https://stackoverflow.com/questions/18852782
复制相似问题