DWF
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
DWF Toolkit with Managed C++
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
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.
Thanks
Gabriel
Re: DWF Toolkit with Managed C++
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
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.
Bogdan
Re: DWF Toolkit with Managed C++
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Bodgan,
I can use VS 2005 too, if it will work.
Do you mind sharing your compiler and linker command line options? Below are mine.
Thanks
CL:
/Od /I "..\..\..\..\Installs\DWFTookit\DWFToolkit-7.6\DWF
rompt /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys
Linker:
/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 /ERRORREPORT
ROMPT 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
Re: DWF Toolkit with Managed C++
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
C/C++
/Od /I "." /I "C:\Develop\APIs\DWFToolkit-7.6\develop\global\src
rompt /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys
Linker
/OUT:"C:\Develop\Projects\Test2011\Sources\..\Bin\
ROMPT 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
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
Good luck,
Bogdan
Re: DWF Toolkit with Managed C++
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Bogdan,
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
Gabriel
