2012年12月5日水曜日

Apache OpenOffice: embedservでatls.libを取り込みしない件

Apache OpenOfficeのビルドで、
ATL_LIBやATL_INCLUDEを正しく設定しているにも関わりませず、
次の様なビルドエラーになる場合が有ります。

Making:    emser.dll
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

/MAP /OPT:NOREF -safeseh -nxcompat -dynamicbase -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO /SUBSYSTEM:CONSOLE /DLL -out:../wntmsci12.pro/bin/emser.dll -map:../wntmsci12.pro/misc/emser.map -def:../wntmsci12.pro/misc/emser.def -implib:../wntmsci12.pro/lib/emserimp.lib ../wntmsci12.pro/slo/emser_version.obj ../wntmsci12.pro/slo/register.obj ../wntmsci12.pro/slo/servprov.obj ../wntmsci12.pro/slo/docholder.obj ../wntmsci12.pro/slo/ed_ipersiststr.obj ../wntmsci12.pro/slo/ed_idataobj.obj ../wntmsci12.pro/slo/ed_ioleobject.obj ../wntmsci12.pro/slo/ed_iinplace.obj ../wntmsci12.pro/slo/iipaobj.obj ../wntmsci12.pro/slo/guid.obj ../wntmsci12.pro/slo/esdll.obj ../wntmsci12.pro/slo/intercept.obj ../wntmsci12.pro/slo/syswinwrapper.obj ../wntmsci12.pro/slo/tracker.obj isal.lib icppu.lib icppuhelper.lib ole32.lib gdi32.lib uuid.lib oleaut32.lib msvcrt.lib uwinapi.lib kernel32.lib user32.lib oldnames.lib stlport_vc71.lib ../wntmsci12.pro/misc/emser.res
   ライブラリ ../wntmsci12.pro/lib/emserimp.lib とオブジェクト ../wntmsci12.pro/lib/emserimp.exp を作成中
esdll.obj : error LNK2019: 未解決の外部シンボル "class ATL::CAtlComModule ATL::_AtlComModule" (?_AtlComModule@ATL@@3VCAtlComModule@1@A) が関数 "public: long __thiscall ATL::CComModule::Init(struct ATL::_ATL_OBJMAP_ENTRY30 *,struct HINSTANCE__ *,struct _GUID const *)" (?Init@CComModule@ATL@@QAEJPAU_ATL_OBJMAP_ENTRY30@2@PAUHINSTANCE__@@PBU_GUID@@@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) が関数 "unsigned int __stdcall ATL::_AtlGetConversionACP(void)" (?_AtlGetConversionACP@ATL@@YGIXZ) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegDeleteKeyA@8 が関数 "public: long __thiscall ATL::CRegKey::DeleteSubKey(char const *)" (?DeleteSubKey@CRegKey@ATL@@QAEJPBD@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegDeleteValueA@8 が関数 "public: long __thiscall ATL::CRegKey::DeleteValue(char const *)" (?DeleteValue@CRegKey@ATL@@QAEJPBD@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegCloseKey@4 が関数 "public: long __thiscall ATL::CRegKey::Close(void)" (?Close@CRegKey@ATL@@QAEJXZ) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegCreateKeyExA@36 が関数 "public: long __thiscall ATL::CRegKey::Create(struct HKEY__ *,char const *,char *,unsigned long,unsigned long,struct _SECURITY_ATTRIBUTES *,unsigned long *)" (?Create@CRegKey@ATL@@QAEJPAUHKEY__@@PBDPADKKPAU_SECURITY_ATTRIBUTES@@PAK@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegOpenKeyExA@20 が関数 "public: long __thiscall ATL::CRegKey::Open(struct HKEY__ *,char const *,unsigned long)" (?Open@CRegKey@ATL@@QAEJPAUHKEY__@@PBDK@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegSetValueExA@24 が関数 "public: long __thiscall ATL::CRegKey::SetDWORDValue(char const *,unsigned long)" (?SetDWORDValue@CRegKey@ATL@@QAEJPBDK@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegQueryInfoKeyA@48 が関数 "protected: int __thiscall ATL::CRegParser::HasSubKeys(struct HKEY__ *)" (?HasSubKeys@CRegParser@ATL@@IAEHPAUHKEY__@@@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル __imp__RegEnumKeyExA@32 が関数 "public: long __thiscall ATL::CRegKey::RecurseDeleteKey(char const *)" (?RecurseDeleteKey@CRegKey@ATL@@QAEJPBD@Z) で参照されました。
esdll.obj : error LNK2019: 未解決の外部シンボル "class ATL::CAtlBaseModule ATL::_AtlBaseModule" (?_AtlBaseModule@ATL@@3VCAtlBaseModule@1@A) が関数 "public: long __stdcall ATL::CAtlModule::UpdateRegistryFromResourceS(char const *,int,struct ATL::_ATL_REGMAP_ENTRY *)" (?UpdateRegistryFromResourceS@CAtlModule@ATL@@QAGJPBDHPAU_ATL_REGMAP_ENTRY@2@@Z) で参照されました。
../wntmsci12.pro/bin/emser.dll : fatal error LNK1120: 外部参照 11 が未解決です。
dmake:  Error code 96, while making '../wntmsci12.pro/bin/emser.dll'

1 module(s):
        embedserv
need(s) to be rebuilt

WINDOWS_VISTA_PSDKを定義し、適当な値を設定しましょう。

winenv.set.shファイルの中程に行を追加します。

WINDOWS_VISTA_PSDK=aaa

export WINDOWS_VISTA_PSDK=aaa

winenv.set.shの中に入れてもunsetされることが分かりました。都度、環境変数を作りましょう。

さて、atls.libを含まない事がビルドエラーの原因と考えられます。

embedserv\util\makefile.mkを確認しますと、WINDOWS_VISTA_PSDKの内容有無で判断するようになっています。

.IF "$(WINDOWS_VISTA_PSDK)"!=""
SHL1STDLIBS+=\
  $(ADVAPI32LIB) \
  $(ATL_LIB)$/atls.lib
.ENDIF # "$(WINDOWS_VISTA_PSDK)"!=""

0 件のコメント:

コメントを投稿