Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1241255
  • 博文数量: 76
  • 博客积分: 1959
  • 博客等级: 上尉
  • 技术积分: 2689
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-19 12:07
个人简介

樽中酒不空

文章分类

全部博文(76)

文章存档

2020年(4)

2019年(1)

2017年(2)

2016年(2)

2015年(7)

2014年(11)

2013年(13)

2012年(18)

2011年(2)

2010年(16)

分类: C/C++

2012-12-13 13:02:47

1 编译环境是vc2008
2 编译时如果提示找不到某个.cpp,在工程-->解决方案里去掉该文件。
3 release编译问题:在项目常规里,这里原来是.exe,改成.dll。
4 release编译后如果找不到.lib,说明没有dllexport,简单的办法就是在macros.h前面位置加上
#define GLOOX_EXPORTS

原因在以后几行:

#if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
#  if defined( GLOOX_EXPORTS ) || defined( DLL_EXPORT )
#    define GLOOX_API __declspec( dllexport )
#  else
#    if defined( GLOOX_IMPORTS ) || defined( DLL_IMPORT )
#      define GLOOX_API __declspec( dllimport )
#    endif
#  endif
#endif

#ifndef GLOOX_API
#  define GLOOX_API
#endif

最初什么都没有,#if和#else都进不去,所以dllexport 永远都没有走到。
debug里面在工程设置里面有。

补充一下:
客户端调用gloox的dll时,需要:
#define GLOOX_IMPORTS
理由同上。
阅读(3811) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~