读书人

链接异常哪位能帮个忙

发布时间: 2012-03-03 15:33:02 作者: rapoo

链接错误,哪位大虾能帮个忙 - C++ Builder / Windows SDK/API
请教大家:
SplashOutputDev.obj : error LNK2001: unresolved external symbol "public: __thiscall
SplashFontEngine::SplashFontEngine(int,int)" (??0SplashFontEngine@@QAE@HH@Z)
这是个链接的错误,头文件我添加了,lib库我也添加了
原函数是这样定义的:
SplashFontEngine(
#if HAVE_T1LIB_H
GBool enableT1lib,
#endif
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
GBool enableFreeType,
#endif
GBool aa);

原函数函数的实现:
SplashFontEngine::SplashFontEngine(
#if HAVE_T1LIB_H
GBool enableT1lib,
#endif
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
GBool enableFreeType,
#endif
GBool aa) {
int i;

for (i = 0; i < splashFontCacheSize; ++i) {
fontCache[i] = NULL;
}

#if HAVE_T1LIB_H
if (enableT1lib) {
t1Engine = SplashT1FontEngine::init(aa);
} else {
t1Engine = NULL;
}
#endif
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
if (enableFreeType) {
ftEngine = SplashFTFontEngine::init(aa);
} else {
ftEngine = NULL;
}
#endif
}

[解决办法]
原函数是这样定义的:
SplashFontEngine(
#if HAVE_T1LIB_H
GBool enableT1lib,
#endif
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
GBool enableFreeType,
#endif
GBool aa);
原型里 SplashFontEngine有三个参数,

下面的错误提示你只有两个参数
unresolved external symbol "public: __thiscall
SplashFontEngine::SplashFontEngine(int,int)"

[解决办法]
这样先试试?
fontEngine = new SplashFontEngine(globalParams->getEnableT1lib(),
globalParams->getEnableFreeType(),
allowAntialias && globalParams->getAntialias() && colorMode != splashModeMono1);

[解决办法]
fontEngine = new SplashFontEngine(globalParams->getEnableFreeType(),
allowAntialias && globalParams->getAntialias() && colorMode != splashModeMono1);
这样子可以通过吗?


读书人网 >C++ Builder

热点推荐