Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

VS2005 > VS2010 shell problems

andrew_4619
Honored Contributor III
1,155 Views

I just updatedfrom XE release 3 to release 9 to get the 'Quickwin freezes in x64 fixes' an issue that has plagued me for some time.

This release does not seem so support VS2005 so I have made a clean install with VS2010 shell.

My project is mixed fortran and C, basically the C is all in a static libary linked to the fortran
As VS2010 shell does not support intel C I initially have tried linking with the Libary built under vs2005 ( at alater date I amintending to figure out out to rebuild this library using Intel C on the command line by batch file).

In vs2010 shell the fortran all compiles with no problems but I get some link errors:

Error 1 error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) cadfil70_lib.lib(CadDK25.obj)

Error 2 error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "protected: bool __thiscall std::basic_string,class std::allocator >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z) cadfil70_lib.lib(CadDK25.obj)



What do a need to do to resolve _Xlen and _Xran ? All help greatly appreciated!
0 Kudos
9 Replies
Steven_L_Intel1
Employee
1,155 Views
VS2010 Shell does not support MSVC either. It lacks the C++-only libraries.

I don't recognize Xlen and Xran. They're obviously in some C++ library, but it doesn't sound to me like one of the standard libraries.
0 Kudos
andrew_4619
Honored Contributor III
1,155 Views
They are in a standrad library it looks like MS changed these fuctions to__thiscall instead of __cdecl declarations from 2005 to 2010 so it looks like I must rebuild my library for VS2010.
I am a bit green here, I opened the command prompt from the parellel studio start menu option (which I believe set the correct environment) and bunged my c code at the intel compiler:
icl .cpp
and I get the error VC++ not installed.
do I need some path to the sdk that comes with vs2010 shell? If so what do I need to do/set.
0 Kudos
TimP
Honored Contributor III
1,155 Views
Did you read Steve's previous reply? There is no C++ SDK in the VS2010 shell provided with ifort. If you want C interoperability, you must provide an SDK and set up both ifort and icl to refer to it. The supported Microsoft products are described in the docs.
0 Kudos
Steven_L_Intel1
Employee
1,155 Views
Intel C++ does not work with the VS Shell only - even from the command line. You could download the free Windows SDK - it provides the Microsoft compiler and at least some of the C++ libraries. However, I think you are mistaken about any calling convention change.
0 Kudos
andrew_4619
Honored Contributor III
1,155 Views
Yes I did read it, but the_Xlen and _Xran functions are supplied in the libaries supplied with the SDK with VS2010 shell they are inlibcpmt.lib.
0 Kudos
andrew_4619
Honored Contributor III
1,155 Views
There is a discussion of this issue and call convention changes (which from the lib dumps of the 2 levels I made is correct i think) at:
I will look at the free SDK I am not really using much in the C. Using the URLMON to grab some web data and some interaces to an API that talks to a USB device, I am not sure what the dependancies are. After a lot of grief I will no doubt get to the bottom of it.
0 Kudos
andrew_4619
Honored Contributor III
1,155 Views
I read the release notes for the Free windows sdk is works in some versions of vs including vs2010 but I ma not sure if it works in Vs2010 shell supplied by intel? I though I would ask before messing up my install.
0 Kudos
Steven_L_Intel1
Employee
1,155 Views
The Windows SDK installs into its own location - it will not affect the shell.
0 Kudos
andrew_4619
Honored Contributor III
1,155 Views
Installing the sdk does not help, there is no VC supported added to VS2010 shell, however I have solved my problem in another way.
My C code libary had a interface routine to the functionURLDownloadToFile in urlmon.lib from the sdk supplied as standrad with vs2010 shell, some depananies of this (the 2 unresolveds) had some interface changes from VS2005 to VS2010. I eliminated this from my C code library by making an interface toURLDownloadToFile directly from the fortran.
Everything now links OK but in the long term I need to eliminate the C code totally to remove the need to upgrade my VC as Intel C cannot do the job for me going forward in VS2010 shell. I also need to upgrade my laptop as Vista support for VS2010 shell seems to have gone also!
Thanks for the help on this issue, the Quickwin x64 hang seems to be resolved which was the initial point of the upgrade.
0 Kudos
Reply