2

An mixed-mode C++ application is built using VS2012, it references the managed DLL Noesis.Javascript.dll (which I believe was built with VS2010) which in turn links at runtime with msvcr100.dll.

I have observed a crash which seems to show the code within the Noesis.Javascript.dll calling library functions from VS2012's msvcr110.dll.

Is it possible to run a single process using two different versions of the C++ runtime libraries or is what happening here the likely cause of the problem? What is the alternative?

chillitom
  • 24,888
  • 17
  • 83
  • 118

2 Answers2

1

As mentioned for instance in this answer, it is practically impossible to combine these binaries. The crash is probably caused by the incompatiblity.

You could try the following: Project Properties -> General -> Platform Toolset: Visual Studio 2010 (v100).

Community
  • 1
  • 1
c_k
  • 1,746
  • 1
  • 20
  • 35
1

It is possible to use both runtime DLLs in the same process, but to do so safely requires great care to ensure that no objects from one are used in the other.

Owen Wengerd
  • 1,628
  • 1
  • 11
  • 11
  • 3
    When there is a choice, then yes, it should be avoided. However I think it's important to not state this in absolute terms. In an architecture where no MFC objects are crossing module boundaries it is perfectly reasonable to mix different MFC versions in the same process. One fairly common such case is when a module with a C interface uses CString internally but nothing else from MFC. – Owen Wengerd Mar 01 '13 at 03:12