我试着用libjpeg-turbo和qt。我下载了libjpeg-turbo并安装了。我想在一个项目中使用它,但我有以下错误:
C:\libjpeg-turbo-gcc64 64\bin\libjpeg-62.dll:-1:文件不可识别:文件格式不可识别
一旦删除libjpeg-62. the,我就收到了以下错误:
C:\test\main.cpp:8:错误:对“`tjInitCompress”的未定义引用
为什么libjpeg-62不承认文件格式?
谢谢帮忙,威利
PS。以下是代码:
test.pro
QT += core
QT -= gui
TARGET = test
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += C:\libjpeg-turbo-gcc64\include
LIBS += -LC:\libjpeg-turbo-gcc64\bin -llibjpeg-62main.cpp
#include <QCoreApplication>
#include <turbojpeg.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
tjhandle _jpegCompressor = tjInitCompress();
return a.exec();
}发布于 2014-06-14 08:03:57
好了,现在起作用了,
它是错误的版本的libjpeg-turbo。现在我用的是libjpeg-turbo-gcc,而不是libjpeg-turbo-gcc 64。此外,我还将Libs路径更改为LIBS += "C://libjpeg-turbo-gcc64//bin//libjpeg-62.dll"。
MfG威利
https://stackoverflow.com/questions/24211962
复制相似问题