如何在 MinGW 中使用 GLEW

How to use GLEW with MinGW(如何在 MinGW 中使用 GLEW)
本文介绍了如何在 MinGW 中使用 GLEW的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我试图使用glew32.lib 文件链接到我的项目中,而不是我自己编译Glew 源代码来获得glew.a 文件.现在,我的项目中有这些链接错误:

I was trying to use glew32.lib file to link in my project, than I compile Glew source by myself to get glew.a file. Now, I have these link errors in my project:

g++ -o Chapter10(OpenCLTest).exe srcChapter10(OpenCLTest).o -lopengl32 -lglew -lglut32 -lglu32 -lopencl
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x167): undefined reference to `_imp____glewBindBuffer'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x39a): undefined reference to `_imp__glewInit'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x3a7): undefined reference to `_imp__glewIsSupported'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x48a): undefined reference to `_imp____glewGenBuffers'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x495): undefined reference to `_imp____glewBindBuffer'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x4dd): undefined reference to `_imp____glewBufferData'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x50b): undefined reference to `_imp____glewGetBufferParameteriv'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x1d67): undefined reference to `_imp____glewBindBuffer'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x1d7f): undefined reference to `_imp____glewDeleteBuffers'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x1d95): undefined reference to `_imp____glewBindBuffer'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x1dad): undefined reference to `_imp____glewDeleteBuffers'
srcChapter10(OpenCLTest).o:Chapter10(OpenCLTest).cpp:(.text+0x2078): undefined reference to `_imp____glewBindBuffer'
collect2: ld returned 1 exit status

解决这个问题很好,但顺便问一下,gl 扩展是否还有其他 opengl 实现?

It is good to solve this problem but by the way I want to ask are there any other opengl implementaions of gl extentions?

推荐答案

你可以试试 GLee本质上与 GLEW 做同样的事情.

You could try GLee which essentially does the same thing as GLEW.

这篇关于如何在 MinGW 中使用 GLEW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Prevent class inheritance in C++(防止 C++ 中的类继承)
Why should I declare a virtual destructor for an abstract class in C++?(为什么要在 C++ 中为抽象类声明虚拟析构函数?)
Why is Default constructor called in virtual inheritance?(为什么在虚拟继承中调用默认构造函数?)
C++ cast to derived class(C++ 转换为派生类)
C++ virtual function return type(C++虚函数返回类型)
Is there any real risk to deriving from the C++ STL containers?(从 C++ STL 容器派生是否有任何真正的风险?)