Qt 中 OpenCV "Can't load OpenGL extension [glBindBuffer] in function IntGetProcAddress"例外
"Can't load OpenGL extension [glBindBuffer] in function IntGetProcAddress" exception of OpenCV in Qt
本文关键字:glBindBuffer extension function 例外 IntGetProcAddress OpenGL in load Can OpenCV Qt 更新时间:2023-10-16
我从opencv网站下载了OpenCV 2.4.6。为了避免我之前提到的问题,我决定编译OpenCV库。在CMake和Mingw32-make之后,编译成功。但是,一个简单的测试程序在显示 jpeg 图像时崩溃。这是我的 .pro 和主.cpp文件:
.pro:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
#INCLUDEPATH += D:/opencv2.4.6/build/include
INCLUDEPATH += D:/opencv2.4.6/release/install/include
LIBS += -LD:/opencv2.4.6/release/install/bin
-lopencv_core246
-lopencv_highgui246
-lopencv_imgproc246
-lopencv_features2d246
-lopencv_calib3d246
主.cpp:
int main() {
Mat input = imread("Z:/1.jpg");
cv::imshow("1.jpg",input);
}
问题是这样的:
OpenCV Error: OpenGL API call (Can't load OpenGL extension [glBindBuffer]) in In
tGetProcAddress, file ......modulescoresrcgl_core_3_1.cpp, line 141
terminate called after throwing an instance of 'cv::Exception'
what(): ......modulescoresrcgl_core_3_1.cpp:141: error: (-219) Can't lo
ad OpenGL extension [glBindBuffer] in function IntGetProcAddress
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
我以前从未遇到过这样的问题。这有点奇怪。我应该怎么做才能摆脱这个问题?
在尝试编译OpenCV后,似乎应该取消选中WITH_OPENGL。现在程序正常运行。
相关文章:
- 无法在"catch(const std::exception &ex)"中捕获 std::invalid_argument
- VirtualAlloc/Ex 分配什么样的内存
- 英特尔 TBB - "初始化关键部分 Ex":找不到标识符编译器错误
- Stroustrup Ex.7, Chap.4 - C++ Syntax
- 为什么必须同时使用 glBindBuffer 和 glBindBufferRange 在 OpenGL 中创建统一的缓冲
- 如果我们有glBindBuffer,"glGenBuffers"真的很重要吗?
- 复制文件时如何调用取消?(使用复制文件 ex 函数和复制进度例程回调函数)
- 我已经将红皮书 9ed ex. 3.7 从旧函数转换为 4.5 函数,但它没有显示任何内容
- OpenGL 3.3: GL_INVALID_OPERATION when calling glBindBuffer
- 将多个cmd.exe参数/参数传递给Shellexecute(ex)
- ex.nested try-catch中的什么()更改
- OpenGL 3.x - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER) and VAOs
- 谁能告诉我如何用字符串初始化 ex 对象
- FMOD EX内存分配问题
- gpu::morphologyEx在CPU中比morphology Ex慢
- glBindBuffer crash - 使用 glew 实现 VBO
- 在 qopenglfunctions.h 中找不到 glGenBuffers、glBindBuffer 等
- 如何为在 .props 文件中声明的非本机 VC 编译器 (GCC) 实现 MSBUILD 文件跟踪功能 (跟踪器.ex
- glBindBuffer 的访问冲突
- Qt 中 OpenCV "Can't load OpenGL extension [glBindBuffer] in function IntGetProcAddress"例外