libjpegTurbo: libjpeg-62文件无法识别

libjpegTurbo: libjpeg-62 File not recognized

本文关键字:识别 文件 libjpeg-62 libjpegTurbo      更新时间:2023-10-16

我尝试使用libjpeg-turbo与qt。我下载了libjpeg-turbo并安装了。我想在一个项目中使用它,但我得到了以下错误:

C:libjpeg-turbo-gcc64binlibjpeg-62.dll:-1: Error: file not .dllrecognized:文件格式未识别

当我删除libjpeg-62.dll时,我收到了以下错误:

C:testmain.cpp:8: Error: undefined reference to"tjInitCompress"

为什么libjpeg-62不能识别文件格式?

谢谢你的帮助,威利

p。下面是代码:

test.pro

QT       += core
QT       -= gui
TARGET = test
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app

SOURCES += main.cpp

INCLUDEPATH += C:libjpeg-turbo-gcc64include
LIBS += -LC:libjpeg-turbo-gcc64bin -llibjpeg-62

main.cpp

#include <QCoreApplication>
#include <turbojpeg.h>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    tjhandle _jpegCompressor = tjInitCompress();

    return a.exec();
}

现在可以运行了,

是错误的libjpeg-turbo版本。现在我使用libjpeg-turbo-gcc而不是libjpeg-turbo-gcc64。我还将lib - path更改为LIBS += "C://libjpeg-turbo-gcc64//bin//libjpeg-62.dll"

有限公司威利