Select to view content in your preferred language

Build errors upgrading to VS2013 and ArcGIS 10.3.1

1152
2
10-12-2016 09:48 AM
ErikaDade
Occasional Contributor

Hi-

I am upgrading a VS2010 C++ project for ArcGIS10.2 to VS2013 and ArcGIS10.3.1.  Running on Win 7 Pro 64-bit and passed all hardware and OS recommendations for being able to run ArcGIS10.3.

In stdafx.h, there are imports for all ESRI libs, such as:

#import "c:\Program Files (x86)\ArcGIS\Desktop10.3\com\esriSystem.olb" raw_interfaces_only, raw_native_types, no_namespace, named_guids, exclude("OLE_COLOR", "OLE_HANDLE", "VARTYPE")

On build,

.\myprojectpath\debug\esrisystem.tlh(374): warning C4099: 'XMLSerializer' : type name first seen using 'class' now seen using 'struct'
1>          C:\Program Files (x86)\Windows Kits\8.1\Include\um\mshtml.h(8463) : see declaration of 'XMLSerializer'

.\myprojectpath\debug\esrisystem.tlh(4210): error C3121: cannot change GUID for class 'XMLSerializer'
1>          C:\Program Files (x86)\Windows Kits\8.1\Include\um\mshtml.h(8463) : see declaration of 'XMLSerializer'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

So the class/struct is multiply defined between esri and system libs, but does anyone have an idea what to do about it?

Thank you for your help!

0 Kudos
2 Replies
deleted-user-OFT1wBX1CgU4
Deactivated User

Same thing here. Upgrading project from ArcGIS 10.3.1 to 10.4.1. Visual Studio is the same (2013)

Edit:

I think I found a solution:

You see in the posted error messages the reference to the causing *.tlh file. Just add for every according import in stdafx.h a rename like this:

rename("XMLSerializer", "ESRI_XMLSerializer")

With this the class will be renamed in the generated *.tlh file which solves the conflict.

In your and also mine case the error is caused by esriSystem so I added the rename to the esriSystem import.

0 Kudos
ErikaDade
Occasional Contributor

Thanks so much. Just the ticket.

0 Kudos