Last time I got to the point where I had found that I can’t build the code in Windows 8 because DirectX 11.1 has deprecated a bunch of DirectX 9 functionality, so I installed the Jun 2010 DirectX SDK to get up and running. My plan is to get it building as a Windows 8 Desktop library, and then rip out the code that won’t e compatible with WinRT.
The next thing I discovered that the function object classes in the STL (std::plus, std::minus etc), were causing a bunch of errors in Vertex.h, the fix was to find AssimpPCH.h in the “Header Files” folder, and add an “#include <functional> to the list of STL includes.
Rebuilding from there gives me a a dirty ole’ LNK2019 in the assimp_viewer project. I think the CMAKE files aren’t adding a -Ld3d9 directive, so I added an entry to “Additional Dependencies” under link settings to “C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86\d3d9.lib”
Make sure you set a value for CMAKE_INSTALL_PREFIX, and build the “INSTALL” project. You’ll then need to add the CMAKE_INSTALL_PREFIX\lib folder to your path so that you can run the assimp_viewD.exe file.
So far, so good. My next step is to rip out the D3D9 stuff and upgrade it with D3D11 stuff, so that I can build it as a Desktop / Windows Pro assembly. After that I can work out how to make it into a Windows Store app/library, which will be more challenging because of the requirements of the WinRT platform (eg file access must be asynchronous).
See you next time.
2 thoughts on “Porting Open Asset Import Library (Assimp) to WinRT (2)”
You could’ve set BUILD_ASSIMP_TOOLS to false in order to not have the viewer which is the only thing that needs DirectX. Did you manage to compile it with Boost? CMAKE seems to have my boost, even if I got Cmake-Boost.
I opted to use the substitute for boost, rather than trying to build boost for myself on this occasion… I’ve built boost myself before but I wanted to keep my focus narrow. If you go with out-of-the-box settings on Win8 you get a number of security errors around unchecked string functions etc – Microsoft have kicked it up a notch in terms of protecting against buffer overrun errors.
My main interest is in actually being able to build an application with the library, and to get a handle on the challenges involved, so building the viewer, or a similar type of application is quite important to me. I haven’t made much progress on this lately, because I’ve been working on an electronics project.