After finally replacing my outdated Visual Studio V6(1999 vintage) with Visual Studio 2010 I am getting the following error when compiling an existing C++ app that uses the Notes C++ Api.
c:\apis\notescpp_v8\notescpp\include\nsfdata.h(73): error C2371: ‘DBID’ : redefinition; different basic types
1> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\oledb.h(718) : see declaration of ‘DBID’
I saw some similar postings in the Domino 6/7 forum, but nobody ever posted a solution.
Subject: You have a mismatch between Windows’s understanding of DBID and Notes’
As the warning says; Microsoft SDKs\Windows\v7.0A\include\oledb.h contains a definition of DBID, and so does one of your Notes API header files. The Notes API has another definition which doesn’t match Windows’. I would track down what basic type Notes’ version of DBID resolve to (UINT, WORD, INT etc) and perhaps try a file-scope redefinition of DBID for Notes-includes
Subject: You have a mismatch between Windows’s understanding of DBID and Notes’
I also had the similar problem while using the combination VS2010-Lotus 8- C++ API. I have done much research & when i rectify one error another will pop-up. Now I am using VS 2005 instead of 2010. The same code will run on 2005 without any error.
Subject: You have a mismatch between Windows’s understanding of DBID and Notes’
I think the error that you defined happens because Microsoft Visual C++ and the Notes C++ API Toolkit contain some header files with the same name but different contents. The contents in API should be used while compiling.
But the program will not work even if you hardcode the full path of your API header file. I suggest you once try running your program in VS 2005.
Also I was trying to created DLL in 2005 & it gives some non-code related error. But when i bring the code back to VS6 it creates the DLL without any problems. So it is like test the EXE in VS 2005,Create the DLL in VS 6…:)…Do please post in this thread if you find any solution.