3

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 Jun 24, 2013 at 15:16
2
  • 1
    microsoft.com/en-us/download/details.aspx?id=2890 Commented Jun 24, 2013 at 16:46
  • 1
    If 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. Commented Jun 24, 2013 at 16:53

1 Answer 1

5

Library files cannot be reused across different versions of the compiler. You will need to do one of the following:

  1. Compile your project with the same version of the compiler used for creating the library files you have.
  2. Obtain new library files from the owner of the code, compiled using the same compiler you are now using.
  3. Obtain the source code for the libraries, and compile new versions of them yourself.
  4. Rewrite the code you own to not depend on the libraries you cannot control, since your build environment does not allow for their use.
answered Jun 24, 2013 at 15:20
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for that. With a bit more hunting I found Visual Studio 2010 Professional on CNet, so your option 1 is possible after all.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.