Migration from 9.3 to 9.4 beta compilation issue

290
2
02-15-2010 06:43 AM
MuraliChoudari
New Contributor III
When we migrate from 9.3 to 9.4, we are getting the following error during compilation.

esricarto.tlh(17486) : error C2504: 'IThreadedJob' : base class undefined
esricarto.tlh(17543) : error C2504: 'IThreadedJob' : base class undefined

i guess something i need to register in my environment with 9.4 dll or something, please give your thoughts on this issue.

Thanks in advance.

Regards,
Murali Choudari.
0 Kudos
2 Replies
RichardWatson
Frequent Contributor
When you import type libraries into C++ you have to import the library and, prior to it, any libraries it references.  This is tedious and is required because the functionality to do this is not supported by ESRI.

I do not have my code in front of me but I had the exact same issue.  You have to search SDK for the missing interface and import that library.  Once you do that then you probably have to repeat this pattern until the compiler is happy.

http://help.esri.com/en/sdk/9.4/Arcobjects_net/ComponentHelp/index.htm#/d/000800000044000000/

Good luck!
0 Kudos
UmbertoRaggiani
New Contributor III
I think this might work : I am not 100% sure about the CLSID

#ifdef _ARCMAP10
//import esriSystem.olb 
 #import "libid:5E1F7BC3-67C5-4AEE-8EC6-C4B73AAC42ED" raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_COLOR", "OLE_HANDLE", "VARTYPE")
//import esriSystemUI.olb
 #import "libid:4ECCA6E2-B16B-4ACA-BD17-E74CAE4C150A" raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_HANDLE", "OLE_COLOR")
// import esriGeometry.olb
 #import "libid:C4B094C2-FF32-4FA1-ABCB-7820F8D6FB68" raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_HANDLE", "OLE_COLOR", "ISegment")
// import esriDisplay.olb
 #import "libid:59FCCD31-434C-4017-BDEF-DB4B7EDC9CE0" raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_HANDLE", "OLE_COLOR")
//import esriGeoDatabase.olb
 #import "libid:0475BDB1-E5B2-4CA2-9127-B4B1683E70C2" raw_interfaces_only raw_native_types no_namespace named_guids
//import esriCarto.olb
 #import "libid:45AC68FF-DEFF-4884-B3A9-7D882EDCAEF1" raw_interfaces_only raw_native_types no_namespace named_guids exclude("UINT_PTR")
// esriGISClient version 10 {746F6817-89BB-4490-9829-83CA25FD505A}
 #import "libid:746F6817-89BB-4490-9829-83CA25FD505A" raw_interfaces_only raw_native_types no_namespace named_guids
// esriServer = {18F2FC71-6B30-45b9-B101-037A8B868B66}
 #import "libid:18F2FC71-6B30-45b9-B101-037A8B868B66" raw_interfaces_only raw_native_types no_namespace named_guids
// esridatasourcesfile = {1CE6AC65-43F5-4529-8FC0-D7ED298E4F1A}
 #import "libid:1CE6AC65-43F5-4529-8FC0-D7ED298E4F1A" raw_interfaces_only raw_native_types no_namespace named_guids // gives me a definition for CLSID_ShapefileWorkspaceFactory
//esridatasourcesGDB  = {4A037613-879A-484D-AF82-0802947C627B}
 #import "libid:4A037613-879A-484D-AF82-0802947C627B" raw_interfaces_only raw_native_types no_namespace named_guids  // gives me a definition for CLSID_InMemoryWorkspaceFactory
// esriOutput = {7DB92CEC-CB65-420A-8737-FCD0722FD436}
 #import "libid:7DB92CEC-CB65-420A-8737-FCD0722FD436" raw_interfaces_only raw_native_types no_namespace named_guids 
// esriGeoprocessing. == {C031A050-82C6-4F8F-8836-5692631CFFE6}
 #import "libid:C031A050-82C6-4F8F-8836-5692631CFFE6" raw_interfaces_only raw_native_types no_namespace named_guids 

#else
 #import "esriSystem.olb"      raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_COLOR", "OLE_HANDLE", "VARTYPE")
 #import "esriSystemUI.olb"    raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_HANDLE", "OLE_COLOR")
 #import "esriGeometry.olb"    raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_HANDLE", "OLE_COLOR") rename("ISegment","IZegment")
 #import "esriDisplay.olb"     raw_interfaces_only raw_native_types no_namespace named_guids exclude("OLE_HANDLE", "OLE_COLOR")
 #import "esriGeoDatabase.olb" raw_interfaces_only raw_native_types no_namespace named_guids rename("ICursor","IKursor")
 #import "esriCarto.olb"       raw_interfaces_only raw_native_types no_namespace named_guids exclude("UINT_PTR")
 #import "esriGISClient.olb"   raw_interfaces_only raw_native_types no_namespace named_guids
 #import "esriServer.olb"      raw_interfaces_only raw_native_types no_namespace named_guids 
 #import "esridatasourcesfile.olb" raw_interfaces_only raw_native_types no_namespace named_guids // gives me a definition for CLSID_ShapefileWorkspaceFactory
 #import "esridatasourcesgdb.olb" raw_interfaces_only raw_native_types no_namespace named_guids  // gives me a definition for CLSID_InMemoryWorkspaceFactory
 #import "esriOutput.olb"      raw_interfaces_only raw_native_types no_namespace named_guids 
 #import "esriGeoprocessing.olb"      raw_interfaces_only raw_native_types no_namespace named_guids 
#endif

0 Kudos