Visual Studio <AtlImplementationDetails> IntelliSense Error

Visual Studio <AtlImplementationDetails> IntelliSense Error

本文关键字:IntelliSense Error gt AtlImplementationDetails lt Visual Studio      更新时间:2023-10-16

我试图导入一个vssln文件,可能是使用vs2010或2008创建的VS 2013终极版。这很顺利,我可以重建这个项目。

然后我添加了opencv库,它不会编译,在atlbase.h文件中得到以下错误:

namespace __identifier("<AtlImplementationDetails>")

多次导致"IntelliSense: expected c++ Keyword"和

inline LSTATUS CRegKey::EnumKey(
_In_ DWORD iIndex,
_Out_writes_to_(*pnNameLength, *pnNameLength) _Post_z_ LPTSTR pszName,
_Inout_ LPDWORD pnNameLength,
_Out_opt_ FILETIME**  pftLastWriteTime) throw()
{
  FILETIME* ftLastWriteTime;
  ATLASSUME(m_hKey != NULL);
  if (pftLastWriteTime == NULL)
  {
      pftLastWriteTime = &ftLastWriteTime;
  }
return ::RegEnumKeyEx(m_hKey, iIndex, pszName, pnNameLength, NULL, NULL,    NULL, pftLastWriteTime);
}

多次导致"IntelliSense: FILETIME是模棱两可的"。为了解决这个问题,我将其更改为

System::Runtime::InteropServices::ComTypes::FILETIME* ftLastWriteTime;

,但这会导致以下错误:

7   IntelliSense: The Deklaration is not compatible with ""LSTATUS ATL::CRegKey::EnumKey(DWORD iIndex, LPTSTR pszName, LPDWORD pnNameLength, System::Runtime::InteropServices::ComTypes::FILETIME *pftLastWriteTime = (System::Runtime::InteropServices::ComTypes::FILETIME *)0)" (deklared in 5685 von "C:VisualStudioVCatlmfcincludeAtlBase.h")".    c:VisualStudioVCatlmfcincludeatlbase.h 5826    25  Start IPC2

任何想法?

最好的,hh

确保你已经将你的OpenCV库设置为正确的Visual Studio版本。

在这种情况下,将它们从VS11更改为VS12,它将工作。你所犯的错误只会让你走上一条痛苦和困惑的道路。

相关文章: