I’m trying to use the Open XML SDK with C++/CLI with MSVC 10 compiler. However, I’m trying to use the QtCreator IDE and I’m still a begginer with C++/CLI.
I’m trying to compile a file of this project, but I get this error:
file.h:24: error: C2653: 'DocumentFormat' : is not a class or namespace name
The line 24 is like this:
gcroot<DocumentFormat::OpenXml::Packaging::WordprocessingDocument^> doc;
As the Open XML SDK is made with C#, it doesn’t have headers. But how do I make my compiler aware of what I’m trying to do? Looks like there are some options to do this with Visual Studio’s IDE, but I want the command line magic.
You want the
/FUoption. Or add#usingto your source code.