I've been sent a sample app for a newly minted SDK, and I can't compile it - it won't compile at all in Visual Studio Express for reasons of ATL, and that seems to be the only version of VS 2010 that Microsoft still makes available. So I'm trying to compile it in VS 2012 Professional, but it gives me error LNK2038. From what I can gather e.g. from this thread, the problem is down to trying to use .lib files compiled for 2010 in the 2012 version. Since I'm not the one who compiled the .lib, and I don't have the code for it, and VS 2010 is inaccessible, I'm really not sure what to do about this unless the original authors recompile it. Any suggestions? Something basic I'm missing? Many thanks for any help.
Asked
Active
Viewed 2,481 times
3
-
1http://www.microsoft.com/en-us/download/details.aspx?id=2890 – Hans Passant Jun 24 '13 at 16:46
-
1If you have a valid RTM license for VS2012 then you also have a license to use any previous version of VS. So try entering your license number in this trial edition for VS2010. Never tried it myself. – Hans Passant Jun 24 '13 at 16:53
1 Answers
5
Library files cannot be reused across different versions of the compiler. You will need to do one of the following:
- Compile your project with the same version of the compiler used for creating the library files you have.
- Obtain new library files from the owner of the code, compiled using the same compiler you are now using.
- Obtain the source code for the libraries, and compile new versions of them yourself.
- Rewrite the code you own to not depend on the libraries you cannot control, since your build environment does not allow for their use.

Sam Harwell
- 97,721
- 20
- 209
- 280
-
Thanks for that. With a bit more hunting I found [Visual Studio 2010 Professional on CNet](http://download.cnet.com/Microsoft-Visual-Studio-2010-Professional/3000-2212_4-10618634.html), so your option 1 is possible after all. – Oolong Jun 25 '13 at 14:42