fatal error LNK1104: 无法打开文件“gl_helper.h”

来源:互联网 发布:苏州百度快照优化 编辑:程序博客网 时间:2024/06/15 15:10




编译cuda的例子时,会遇到


fatal error LNK1104: 无法打开文件“gl_helper.h”


由于没有成功调用cpu_bitmap这个文件,才会报这个错误,可以手动在工程中添加一下这个文件


文件代码为


gl_helper.h

#ifndef __GL_HELPER_H__#define __GL_HELPER_H__#ifdef _WIN64#define GLUT_NO_LIB_PRAGMA#pragma comment (lib, "opengl32.lib")  /* link with Microsoft OpenGL lib */#pragma comment (lib, "glut64.lib")    /* link with Win64 GLUT lib */#endif //_WIN64#ifdef _WIN32/* On Windows, include the local copy of glut.h and glext.h */#include "GL/glut.h"#include "GL/glext.h"#define GET_PROC_ADDRESS( str ) wglGetProcAddress( str )#else/* On Linux, include the system's copy of glut.h, glext.h, and glx.h */#include <GL/glut.h>#include <GL/glext.h>#include <GL/glx.h>#define GET_PROC_ADDRESS( str ) glXGetProcAddress( (const GLubyte *)str )#endif //_WIN32#endif //__GL_HELPER_H__'

---------------------------------------------------------------------------------------------------------------------------------------

2016.9.27 补更


gl_helper.h这个文件是在CUDA_BY_EXAMPLE中是自带的,也可以直接下载放到工程中


下面我分享一下CUDA_BY_EXAMPLE中 自带的几个头文件,包括

book.h

cpu_anim.h

cpu_bitmap.h

gl_helper.h

gpu_anim.h

glext.h

glut.h

下载链接地址



0 0
原创粉丝点击