エラーは次のとおりです。
エラー 14 エラー LNK2005: "void __stdcall _set_com_error_handler(void (__stdcall*)(long,struct IErrorInfo *))" (?_set_com_error_handler@@YGXP6GXJPAUIErrorInfo@@@Z@Z) comsupp.lib(comsupp.obj) comsuppwd で既に定義されています。ライブラリ
以前に誰かがこれに遭遇しましたか?
エラーは現在解決されています。エラーの原因はヘッダーファイルでした:#include <msclr\marshal_cppstd.h>
からSystem::String^
への変換std::string
(同様の問題が見つかりましたhere ):
//commented out following 3 lines and problem solved:
//looks like following type conversion has problems:
#include <msclr\marshal_cppstd.h>
msclr::interop::marshal_context marshal_context_1;
string_TempDir_XMLfiles=marshal_context_1.marshal_as<std::string>(String_Ptr_Destin_Dir_XMLfiles);