在vs2013 上配置imagemagick ,一直打不开CORE_RL_Magick++_.lib

igoindown 2017-04-23 04:30:31
用的代码是这些
#include <iostream>
#include <Magick++.h>
#include <zbar.h>


#pragma comment(lib,"CORE_RL_Magick++_.lib")
#define STR(s) #s

using namespace std;
using namespace zbar;

int main(int argc, char **argv)
{
// if(argc < 2) return(1);

#ifdef MAGICK_HOME
// http://www.imagemagick.org/Magick++/
// under Windows it is necessary to initialize the ImageMagick
// library prior to using the Magick++ library
Magick::InitializeMagick(MAGICK_HOME);
#endif

// create a reader
ImageScanner scanner;

// configure the reader
scanner.set_config(ZBAR_NONE, ZBAR_CFG_ENABLE, 1);

// obtain image data
Magick::Image magick("barcode.png"); // read an image file
int width = magick.columns(); // extract dimensions
int height = magick.rows();
Magick::Blob blob; // extract the raw data
magick.modifyImage();
magick.write(&blob, "GRAY", 8);
const void *raw = blob.data();

// wrap image data
Image image(width, height, "Y800", raw, width * height);

// scan the image for barcodes
int n = scanner.scan(image);

// extract results
for (Image::SymbolIterator symbol = image.symbol_begin();
symbol != image.symbol_end();
++symbol) {
// do something useful with results
cout << "decoded " << symbol->get_type_name()
<< " symbol \"" << symbol->get_data() << '"' << endl;
}

// clean up
image.set_data(NULL, 0);

return(0);
}


报错是如下

1>------ 已启动生成: 项目: ConsoleApplication5, 配置: Debug Win32 ------
1> 源.cpp
1>源.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall Magick::Blob::Blob(void)" (??0Blob@Magick@@QAE@XZ),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: virtual __thiscall Magick::Blob::~Blob(void)" (??1Blob@Magick@@UAE@XZ),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: void const * __thiscall Magick::Blob::data(void)const " (?data@Blob@Magick@@QBEPBXXZ),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall Magick::Image::Image(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Image@Magick@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: virtual __thiscall Magick::Image::~Image(void)" (??1Image@Magick@@UAE@XZ),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: unsigned int __thiscall Magick::Image::columns(void)const " (?columns@Image@Magick@@QBEIXZ),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: unsigned int __thiscall Magick::Image::rows(void)const " (?rows@Image@Magick@@QBEIXZ),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall Magick::Image::write(class Magick::Blob *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int)" (?write@Image@Magick@@QAEXPAVBlob@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@I@Z),该符号在函数 _main 中被引用
1>源.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall Magick::Image::modifyImage(void)" (?modifyImage@Image@Magick@@QAEXXZ),该符号在函数 _main 中被引用
1>LIBCMTD.lib(wwincrt0.obj) : error LNK2019: 无法解析的外部符号 _wWinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
1>D:\我的文档\Visual Studio 2013\Projects\ConsoleApplication5\Debug\ConsoleApplication5.exe : fatal error LNK1120: 10 个无法解析的外部命令
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========



...全文
449 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
invisible_sky 2017-09-18
  • 打赏
  • 举报
回复
CORE_RL_magick_.lib 这个dll没有引用,但是在安装lib中又找不到,但是在安装demo中使用到了
invisible_sky 2017-09-18
  • 打赏
  • 举报
回复
CORE_RL_magick_.lib
赵4老师 2017-04-24
  • 打赏
  • 举报
回复
项目、属性、链接器、常规、附加库目录:填写附加依赖库所在目录 分号间隔多项 项目、属性、链接器、输入、附加依赖项:填写附加依赖库的名字.lib 空格或分号间隔多项
赵4老师 2017-04-24
  • 打赏
  • 举报
回复
附加依赖项中不要带路径
igoindown 2017-04-23
  • 打赏
  • 举报
回复
自己再定一下。求大神关注啊
igoindown 2017-04-23
  • 打赏
  • 举报
回复
该配置的都配置了,还是不行

64,636

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧