- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to link a number of libraries that are all built using the Platform toolset V100, but the main routine is compiled and linked with composer XE2013 with VS2012. (but the idea is to support all versions of the compiler and VS). But with one of the libraries I get the LNK2038 mismatch detected for _MSC_VER 1700. Is there a way in a command line to specify the platform toolset? I get messages when I've tried to add /p:PlatformToolset=v100 that it isn't recognized. Seems to be okay if I use a project in VS, but I need to use the command line as well.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The command line environment is configured with the compilervars.bat or ipsxe-comp-vars.bat script. This takes two arguments. The first, which is required, is the platform, either ia32 or intel64. The second, which is optional, is the VS version to be used for tools and libraries. By default it picks the latest VS you have installed, or you can say vs2013, vs2012, vs2010. Maybe you just need to invoke this with vs2010 as the second argument.
I'll be honest and say I have never heard of this error before, which must be an MSVC thing. Intel Fortran is much less picky about mixing VS versions when linking than MSVC is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I think I have a similiar problem.
I have used VS2012 and Intel Visual Fortran Compiler XE 13.1.1.171
to build a Fortran DLL. One of the fortran routines call a C/C++ functions and these are build as a static lib
Everything works fine on my computer
But if I move the Fortran files and the STATIC lib(compiled with Vs2012) to a computer
with VS2013 and uses that tool to build the Fortran DLL
I got these Messages:
Fehler 3 error LNK2038: Konflikt ermittelt für "_MSC_VER": Der Wert "1800" stimmt nicht mit dem Wert "1700" in CC_XXX_Conv.lib(XXXXX.obj) überein. libcpmtd.lib(xlock.obj)
The CC_XXX_Conv.lib is the static lib
It seems to be an issue with the toolset used .
I have tried the method suggested by Steve ( running compilervars.bat as a Pre-build Event)
Same problem...
Anyone know top solve this ?
A question how to I set the toolset in the vfproject ?
or in the linker command line?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may attempt to resolve the problem by recompiling your C/C++ sources with the /D_ALLOW_MSC_VER_MISMATCH option. The same goes for libraries that you build and use in the project. If you have third party libraries that contribute to the mismatch, you may have to obtain updated libraries, or downdate your newer objects to regain compatibility.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page