Compiler Error C3172


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Compiler Error C3172.

module_name': cannot specify different idl_module attributes in a project

idl_module attributes with the same name but different dllname or versionparameters were found in two of the files in a compilation. Only one unique idl_module attribute can be specified per compilation.

Identical idl_module attributes can be specified in more than one source code file.

For example, if the following idl_module attributes were found:

// C3172.cpp  
[ idl_module(name="x", dllname="file.dll", version="1.1") ];  
int main() {}  

And then,

// C3172b.cpp  
// compile with: C3172.cpp  
// C3172 expected  
[ idl_module(name="x", dllname="file.dll", version="1.0") ];  

the compiler would generate C3172 (note the different version values).