0

在此处输入代码我想在我的项目中使用 x264。代码中有一行说:

/* Application developers planning to link against a shared library version of * libx264 from a Microsoft Visual Studio or similar development environment * will need to define X264_API_IMPORTS before including this header. * This clause does not apply to MinGW, similar development environments, or non * Windows platforms. */

但我没有得到这一行:在包含此标头之前定义 X264_API_IMPORTS

我们可以通过其配置创建 x264 dll 并制作

    ./configure --enable-shared
    make

但我不能在我的 Qt 项目中使用 dll。

我可以制作自己的 dll(在另一个代码中)并在项目中使用它。但是当我开始在我的项目中使用 x264 dll 时,我收到以下错误:

    C:\DataHiding\SourceCode2\GUI\DataHiding\mainwindow.cpp:10: error:
    'pulldown_frame_duration' was not declared in this scope
    qDebug() << pulldown_frame_duration[1];
             ^
4

1 回答 1

1

“在包含此标头之前定义 X264_API_IMPORTS”意味着您应该放置以下行:

#define X264_API_IMPORTS

就在这一行之前:

#include <x264.h>
于 2014-08-05T13:12:11.867 回答