MSVC compiler : /doc option with multiple source files?

69 Views Asked by At

I am trying to generate .xdc (document comment) files with the MSVC command line tool cl.exe. I have tried the /doc option, but I can't figure out how to use it properly :

/doc:..\Doc\

In this case I would assume, that the .xcd files would all end up in the Doc directory. But instead, the compiler spits out a warning for each .cpp file. For String.cpp it looks like this :

..\Code\Source\Storage\String.cpp(717): warning C4632: XML document comment: :..\Doc\String.xdc - access denied: The filename, directory name, or volume label syntax is incorrect.

To me, that doesn't make any sense. I then removed the backslash after ..\Doc :

/doc:..\Doc

But the compiler then complains about incorrect syntax of the option :

cl : Command line error D8036 : '/doc:..\Doc' not allowed with multiple source files

The compiler documentation states this about the /doc option :

Causes the compiler to process documentation comments in source code files and to create an .xdc file for each source code file that has documentation comments.

You would think from this, that the compiler is able to generate multiple .xdc files, but the parameter documentation only describes how to do that, when a single .cpp file passed and a single .xdc file should be produced :

name parameter : The name of the .xdc file that the compiler will create. Only valid when one .cpp file is passed in the compilation.

How can I use the /doc option with multiple source files?

Documentation

0

There are 0 best solutions below