文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Builld with gloox

Builld with gloox

时间:2010-12-15  来源:lugesot

我用Gloox编译成dll,然后再自己写个C++ console,2个项目在一个解决方案中(这使我一顿被蒙蔽),去调用它,build error如下:

error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const gloox::GLOOX_VERSION" (?GLOOX_VERSION@gloox@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B

解决方法:

参考http://camaya.net/glooxlist/dev/msg00125.html,

关键在GLOOX_API这个宏的解释上,

在C++ console的Project configuration properties\ c/c++ \Preprocesser\Preprcessor Definitions中加入GLOOX_IMPORTS 或 DLL_IMPORT 使extern 变量声明为 __declspec( dllimport );这样exe程序才认为这是个要从外部导入的变量。

否则不会去外部(dll)中找,自然就说无法解析即找不到了。

 

帮助别人就是提高自己

相关阅读 更多 +
排行榜 更多 +
野生恐龙射击生存安卓版

野生恐龙射击生存安卓版

飞行射击 下载
战场狙击手

战场狙击手

飞行射击 下载
无尽的三月七h5

无尽的三月七h5

休闲益智 下载