问题和
http://topic.csdn.net/u/20080402/19/5cfcdfc3-177e-4a9a-98ea-0e499a00a1e1.html
的一样,在stdafx.h文件中配置好LIB,都是static void __cdecl CBeautyTabCtrlEx::LoadTabBmps(char *,char *,char *)" (__imp_?LoadTabBmps@CBeautyTabCtrlEx@@SAXPAD00@Z) 这样的错误,有没有人知道? 谢谢。
http://topic.csdn.net/u/20080402/19/5cfcdfc3-177e-4a9a-98ea-0e499a00a1e1.html
的一样,在stdafx.h文件中配置好LIB,都是static void __cdecl CBeautyTabCtrlEx::LoadTabBmps(char *,char *,char *)" (__imp_?LoadTabBmps@CBeautyTabCtrlEx@@SAXPAD00@Z) 这样的错误,有没有人知道? 谢谢。
//SkinBeauty Lib Call
#include "SkinBeautyExport.h"
#pragma comment(lib,"SkinBeauty.lib")
#define DELETENEWVAR(p) {if(p){delete p; p = NULL;}}
#define IFNULLRETURN(p) {if(p == NULL)return;}
#define ZERONEWVAR(p) {memset(p,0,sizeof(p));}
#pragma warning(disable:4652)
#pragma warning(disable:4275) //export class
#pragma warning(disable:4251) //export class 还有工程配置上LINK上也加了这个文件的, 看不了啊,但应该在这里的,因为我是从另外一个工程上拷贝过来的。
__cdecl CBeautyGroupCtrlEx::LoadFace(unsigned short *,unsigned short *,unsigned
short *))
?LoadTabBmps@CBeautyTabCtrlEx@@SAXPAG00@Z (public: static void
__cdecl CBeautyTabCtrlEx::LoadTabBmps(unsigned short *,unsigned short *,unsigne
d short *))
你是用哪个版本的VC?如果是用VC6,在stdafx.h中,先定义UNICODE和_UNICODE两个宏;如果是VS.NET,把项目属性中的字符集设置为使用Unicode。另外,程序中有关字符和字符串的类型也都要做响应修改,使用TCHAR、LPTSTR等类型。
static void __cdecl CBeautyTabCtrlEx::LoadTabBmps(char *,char *,char *);
static void
__cdecl CBeautyTabCtrlEx::LoadTabBmps(unsigned short *,unsigned short *,unsigne
d short *);
前者的参数都是char*,是多字节字符集的字符串类型;后者的参数都是unsigned short*,是Unicode字符集(VC6)的字符串类型。
如果不能生成Unicode字符集的版本,可能是你的VC有问题。
我在这个模块的公用的一个头文件上定义了:
#define _UNICODE
#define UNICODE#pragma comment (linker, "/ENTRY:wWinMainCRTStartup") 但是没用,还是出现了之前的nresolved external symbol这样的错误出来.
如果你调用SkinBeauty.lib的函数较少,可以自己修改一下头文件,把与字符有关的类型都改成WCHAR、LPWSTR等类型,在程序中使用Unicode字符串来调用这些函数。