【发布时间】:2018-12-03 01:38:58
【问题描述】:
我一直在尝试将 sfml 静态链接到 c++ 项目,但它总是给我编译器错误,有谁知道这里发生了什么以及如何修复它;
编辑:
这是产生错误的代码:
这就是我放入链接器/包含/附加依赖项部分的内容:
我希望这就是您所需要的,但如果还有其他问题,请具体说明(我是新手)
编辑 2: 以下是所有错误:
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_std_error 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_CreateCompress 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_destroy_compress 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_stdio_dest 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_set_defaults 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_set_quality 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_start_compress 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_write_scanlines 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK2019 未解析的外部符号 _jpeg_finish_compress 在函数“private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string,class std::allocator > const &,class std::vector > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@ EV?$allocator@E@std@@@5@II@Z) Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Dungeon3.0\sfml-graphics-sd.lib(ImageLoader.cpp .obj) 1
严重性代码描述项目文件行抑制状态 错误 LNK1120 9 无法解析的外部 Dungeon3.0 C:\Users\hhgra\source\repos\Dungeon3.0\Debug\Dungeon3.0.exe 1
【问题讨论】:
-
请edit以文字形式提供文字信息。
-
你做了什么来链接那个库?请显示等效的命令行,例如使用 gcc,以及一个具有相同错误的小程序。这将使您的问题缺少minimal reproducible example。
-
我已经用你要求的那些东西的图片更新了它
-
是的,还有更多文字图片。请阅读您对某个问题的反馈。请将文本显示为文本。
-
你的意思是错误信息;
标签: c++ visual-c++ sfml static-linking