Has you managed to use DWF Toolkit in a managed C++ project? If so, can you reveal your project settings?
I am getting loads of LINK errors related to the DWFToolkit header files, similar to the one below:
Error 1 error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x02000019). MSVCMRT.lib
I am using Visual Studio 2008.
I have a C++/CLI project in Visual Studio 2005 including Revit API (.net) and DWF Api (native)
Be sure to set in the project properties at Linker/Input section the required libs for your DWF project. I have: dwfcore.1.6.0.lib dwfcore_wt.1.6.0.lib dwftk.7.6.0.lib dwftk_ro.7.6.0.lib dwftk_wt.7.6.0.lib w3dtk.1.6.1555.lib w3dtk_ro.1.6.1555.lib w3dtk_wt.1.6.1555.lib whiptk.7.12.601.lib whiptk_ro.7.12.601.lib whiptk_wt.7.12.601.lib xaml_wt.7.6.0.lib
Also check if you are including the correct header files for your platform (32 or 64 bits) and if the path to the lib files is correct.
I can use VS 2005 too, if it will work.
Do you mind sharing your compiler and linker command line options? Below are mine.
/Od /I "..\..\..\..\Installs\DWFTookit\DWFToolkit-7.6\DWF
/VERBOSE /OUT:"C:\Test Pad\DWFToolkitPDF\Debug\DWFToolkitPDF.dll" /INCREMENTAL:NO /NOLOGO /DLL /MANIFEST:NO /DEBUG /ASSEMBLYDEBUG /PDB:"C:\Test Pad\DWFToolkitPDF\Debug\DWFToolkitPDF.pdb" /DYNAMICBASE /FIXED:No /NXCOMPAT /MACHINE:X86 /ERRORREPORTROMPT dwfcore.1.6.0.lib dwftk.7.6.0.lib whiptk_wt.7.12.601.lib dwfcore_wt.1.6.0.lib dwftk_ro.7.6.0.lib dwftk_wt.7.6.0.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
/Od /I "." /I "C:\Develop\APIs\DWFToolkit-7.6\develop\global\src
It looks like i don't have this defines /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NON_CONFORMING_SWPRINTFS" /D "DWFCORE_BUILD_ZLIB" /D "DWFCORE_BUILD_EXPAT" /D "WHIP_USE_WCHAR_STRINGS"
It works with 2008 too but you have to link with the libs for vc.90. I see you have no LIBPATH in your settings.
Mine is LIBPATH:"C:\Develop\APIs\DWFToolkit-7.6\develop
I changed my settings to match yours and was able to build the project. I think the critical one was /MDd (instead of /MD which I was using before).
Once again, many thanks