ホーム » 2019 » 6月 » 29

日別アーカイブ: 2019/06/29

2019年6月
 1
2345678
9101112131415
16171819202122
23242526272829
30  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,653 アクセス



Win10 VC 2005 で C1083 msxml.dll

今まで WinXP + VC 2005 だったプロジェクトを Win10 に持ってきてビルドすると,

1>------ ビルド開始: プロジェクト: i3DV, 構成: Debug Win32 ------
1>コンパイルしています...
1>MainFrm.cpp
1>t:\develop\_.src\__iwao\xml_ms_.hxx(21) : fatal error C1083: タイプ ライブラリ ファイルを開けません。'msxml.dll': No such file or directory
1>i3DVView.cpp
1>t:\develop\_.src\__iwao\xml_ms_.hxx(21) : fatal error C1083: タイプ ライブラリ ファイルを開けません。'msxml.dll': No such file or directory
  ...
1>コードを生成中...
1>i3DV - エラー 16、警告 0
========== ビルド: 0 正常終了、1 失敗、0 更新、0 スキップ ==========

Win10 には msxml.dll がないためエラーとなっている.
VC 2008 以降のプロジェクトは Win7 でビルドできる様にしていた ので問題ない.

#if (_WIN32_WINNT >= 0x0600)	// Vista
    #import	<msxml6.dll>       named_guids
    #define	MSXML              MSXML2
    #define	CLSID_DOMDocument  CLSID_DOMDocument60
#else
    #import	<msxml.dll>        named_guids
#endif

WinXP 環境でも msxml6.dll は存在しているので,_MSC_VER>=1400 で判断する様に変更.

#if (_MSC_VER >=  1400)	// VC 2005
    #import	<msxml6.dll>       named_guids
    #define	MSXML              MSXML2
    #define	CLSID_DOMDocument  CLSID_DOMDocument60
#else
    #import	<msxml.dll>        named_guids
#endif

'msxml.dll': No such file or directory への対応


msxml.dll を使用しない方法 で書き直し
https://jml.mish.work/index.php/cpp/xml.html


Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.