Qt Creator with FFmpeg 未解析的外部
Qt Creator with FFmpeg unresolved external
我在Windows中使用带有FFmpeg的Qt Creator。我使用 vs2012 构建了 FFmpeg,并在项目构建环境的 INCLUDE 和 LIB 中指定了路径。然而,当我尝试执行此代码时,我遇到了一个错误:
#include "mainwindow.h"
#include <QApplication>
#include "libavcodecavcodec.h"
#include "libavformatavformat.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
av_register_all();
return a.exec();
}
这是错误:LNK2019:函数_main中引用的未解析外部符号"void __cdecl av_register_all(void)"(?av_register_all@@YAXXZ
)有人可以帮忙吗?
你正在将cpp lib链接到C库。
extern "C" {
#include "libavcodecavcodec.h"
#include "libavformatavformat.h"
}
相关文章:
- 在函数内部的声明中初始化数组,并在外部使用它
- 使外部项目可用于find_package CMake
- C++:Application.cpp中抛出了未解析的外部符号(解决方案在问题的末尾,供未来的读者参考)
- 使用外部SDK工具链文件在VisualStudio上生成项目编译错误
- C++:来自外部文件的Trivia
- 从函数角度看ID到文件路径的内部与外部映射
- C++:将外部库链接到dll库
- spdlog标头仅与外部fmt一起使用.spdlog错误:'内部':不是'fmt'
- 节俭并发:未解决的外部问题
- 无法使用Qt Creator在Windows中构建yaml-cpp
- 如何在c++中从git建立外部库
- 未解析的外部符号_MsiLocateComponentW@12.
- 如何使用对C函数和类对象的外部调用来处理C++头文件
- 在Qt Creator中,如何在连接到正在运行的进程后查看控制台输出
- 如何在QT Creator上将QWidget声明为继承类的对象
- 具有外部"c"和程序集的未定义函数
- 为什么导入Mixed native/CLR lib.dll的本机C++应用程序没有在Mixed lib.dll中的外部变
- 外部库在Qt Creator中抛出未定义的引用错误
- Qt Creator with FFmpeg 未解析的外部
- Qt Creator LNK2019:使用OpenCV的未解析外部符号