b.schneider-esri-ch-esridist

Problems migrating using ArcSDE C SDK project to Windows 7

Discussion created by b.schneider-esri-ch-esridist on Apr 8, 2011
Latest reply on Apr 14, 2011 by b.schneider-esri-ch-esridist
Hello

I am migrating a Microsoft Visual Studio 2005 solution from Windows XP and ArcGIS 9.3.1 to Visual Studio 2008, Windows 7, and ArcGIS 10. The solution contains several ArcMap Class libraries. The libraries are written in C#. One library, however, is written in C++. It is a CLR class library and uses the ArcSDE C SDK.

I have a problem with linking the libraries. One of the error messages is as follows:

error LNK2028: unresolved token (0A00000E) "extern "C" long __stdcall SE_error_get_string(long,char *)" (?SE_error_get_string@@$$J18YGJJPAD@Z) referenced in function "public: static bool __clrcall SDEun_to_man::SDEfuncs::Error(long,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)"

As far as I understand the problem, my C++ project is a managed C++ project, whereas the ArcSDE C SDK libraries are written in native C++. --> My managed project (dll) cannot link to the unmanaged ArcSDE libraries (libs). What is strange: on Windows XP, everything worked fine!

What I did:

- I added the ArcSDE C SDK include folder to 'Project -> Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories'
- I added dd the ArcSDE C SDK lib folder to 'Project -> Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories'
- I added sg.lib, sde.lib, pe.lib and icuuc.lib to 'Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies'

What else must I do?

Thanks a lot for your help in advance,

Barbara

Outcomes