Alex Rivera | Logout

Statically linking against library built with different version of C Runtime Library, ok or bad?

Asked 2009-12-09T09:50:09.810
10

Consider this scenario: An application links to 3rd party library A.

A is built using MSVC 2008 and is statically linking (ie. built with /MT) to the C Runtime Library v9.0.

The application is built using MSVC 2005 and is statically linking to A and (using /MT) to the C Runtime Library v8.0.

I can see trouble with this - for instance if types are changed in the headers between runtime library versions.

Is care taken to keep the runtime library headers compatible between versions, or should one always make sure all statically linked libraries are linking to the same version of the runtime library?

Edit
Report

1 Answer

3

This is a very bad plan. Avoid. Either recompile the library in 2005 or compile the application in 2008.

answered 2009-12-09T09:52:42.603

Your Answer