none
Update from VS2010 C++ to VS2017 get Link 1104 error, can’t find MSVCURT.lib RRS feed

  • Question

  • NO NORMAL CUT AND PASTE AVAILABLE?? I've used the insert code to state the problem.
    I developed a program 9-10 years ago for the Navy using VS2005. While I’ve gone on to better and greater things, I’ve been called upon at various times to maintain/modify this software. One of the last times was in 2012 using VS2010. I’ve just recently been called on to investigate adding some modifications. We now have VS2017. I was able to right click on the solution to convert it into a form that VS2017 could handle but when I attempted to compile, I got the error in the subject line. It seems that there is a problem updating a “.vcxproj” file.
    I did a search and MSVCURT.lib does exist, so one problem must be telling the compiler where it is.
    
    The SDK Version is 10.0.17134.0. Platform toolset is v141.
    
    In various searches, I came across the following piece of info:
    
    msvcurt.lib
    Deprecated Static library for the pure managed CRT.
    /clr:pure
    
    msvcurtd.lib
    Deprecated Static library for the Debug version of the pure managed CRT. Not redistributable.
    /clr:pure
    
    Wonderful. What do I do about this?
    
    Some things I’ve tried unsuccessfully:
    (1)	Go into project properties and linker. Select additional library directories and inherit from parent or project defaults. RESULT – nothing.
    (2)	Looked at compiler options but couldn’t figure out which options I should change.
    
    Basic problem is clearly that VS2017 is not backward compatible with VS2010.
    
    Machine I’m using is on Navy RTD&E (research development test & evaluation) system. I have only user privileges. If anything needs to be downloaded or the like, I have to work through the IT people.
    
    If one were steeped in all of the intricacies of the Visual Studio C++ family of software for the past 10 years or so, it might be possible to figure this out. I’m not.
    
    Help appreciated.
    

    Tuesday, January 15, 2019 4:56 PM

Answers

  • Many thanks! I can now compile. There is now a warning and I'd like to get rid of it. Here's what it says:

    Link: /LTCG specified but no code generation required; remove /LTCG from the link command line to improve performance.

    I assume there is some linker option this relates to but what this is and what needs to be changed I don't know.

    Ordinarily, in a release build the default project properties general options will look like this -

    and the Linker Optimization options will look like -

    Change the general properties to this -

    and so then the Linker optimization options should appear as -

    • Marked as answer by CP Hager Friday, January 18, 2019 3:49 PM
    Thursday, January 17, 2019 8:18 PM
  • With respect, this is not helpful. Both I and the Navy want an existing application that works to continue to work without spending large amounts of the taxpayers' money to rewrite it. Practically, I don't care whether the code is "pure" or not. To me, that is a Microsoft jargon word.

    To restate my question: What is the minimum amount of work needed to get this code to compile? Do I have to use a particular include file? Is there some collection of system functions/methods that I have to use? It can't be this complicated for someone with technical competence in this Microsoft tool to be able to understand what is going on and offer a fix to a customer of the product. In my case, I'm just a user, the customer is Uncle Sam.

    Then change the Common Language Runtime option from /clr:pure to /clr.  If it builds, then its time to commence testing.
    • Marked as answer by CP Hager Thursday, January 17, 2019 7:35 PM
    Thursday, January 17, 2019 7:17 PM

All replies

  • From https://docs.microsoft.com/en-us/cpp/build/reference/clr-common-language-runtime-compilation?view=vs-2017

    • pure

      /clr:pure is deprecated. The option is removed in Visual Studio 2017. We recommend that you port code that must be pure MSIL to C#.


    In the VS2017 IDE you can set the related options from the project properties --

    Tuesday, January 15, 2019 5:15 PM
  • Content Removed
    Tuesday, January 15, 2019 6:05 PM
  • > Wonderful. What do I do about this?

    Debug runtime libraries (those with 'd suffix) never have been redistributable. Who left them over in their projects, got what they deserve.

    Maybe you should find a contractor (a.k.a. consultant) to help with porting the project. And move on to the cool things.

    -- pa

    Wednesday, January 16, 2019 11:20 PM
  • With respect, this is not helpful. Both I and the Navy want an existing application that works to continue to work without spending large amounts of the taxpayers' money to rewrite it. Practically, I don't care whether the code is "pure" or not. To me, that is a Microsoft jargon word.

    To restate my question: What is the minimum amount of work needed to get this code to compile? Do I have to use a particular include file? Is there some collection of system functions/methods that I have to use? It can't be this complicated for someone with technical competence in this Microsoft tool to be able to understand what is going on and offer a fix to a customer of the product. In my case, I'm just a user, the customer is Uncle Sam.

    Thursday, January 17, 2019 6:47 PM
  • Thanks. Unfortunately, I had already tried this - there is no toolset other than VS 2017 available. I've requested the IT people find an only VS 2010 version and install it on my machine. I haven't heard back yet but my assumption is that the Information Assurance (IA) people and a host of others at the Fleet level will say, VS 2017 is what is supported and earlier versions may not be installed.

    I suspect that had someone had the foresight (I suppose it would have had to be me) that "legacy systems" would need to freeze all the development/maintenance tools and petitioned the IA bureaucracy to grant some sort of a waiver that would make this possible. Assuming this process could have even been negotiated, I would be surprised if a waiver would have been granted, given that it would have been necessary to make a convincing case that Microsoft would have a tool that essentially has limited or no backward compatibility.

    Thursday, January 17, 2019 6:55 PM
  • With respect, this is not helpful. Both I and the Navy want an existing application that works to continue to work without spending large amounts of the taxpayers' money to rewrite it. Practically, I don't care whether the code is "pure" or not. To me, that is a Microsoft jargon word.

    To restate my question: What is the minimum amount of work needed to get this code to compile? Do I have to use a particular include file? Is there some collection of system functions/methods that I have to use? It can't be this complicated for someone with technical competence in this Microsoft tool to be able to understand what is going on and offer a fix to a customer of the product. In my case, I'm just a user, the customer is Uncle Sam.

    Then change the Common Language Runtime option from /clr:pure to /clr.  If it builds, then its time to commence testing.
    • Marked as answer by CP Hager Thursday, January 17, 2019 7:35 PM
    Thursday, January 17, 2019 7:17 PM
  • Many thanks! I can now compile. There is now a warning and I'd like to get rid of it. Here's what it says:

    Link: /LTCG specified but no code generation required; remove /LTCG from the link command line to improve performance.

    I assume there is some linker option this relates to but what this is and what needs to be changed I don't know.

    Thursday, January 17, 2019 7:39 PM
  • Many thanks! I can now compile. There is now a warning and I'd like to get rid of it. Here's what it says:

    Link: /LTCG specified but no code generation required; remove /LTCG from the link command line to improve performance.

    I assume there is some linker option this relates to but what this is and what needs to be changed I don't know.

    Ordinarily, in a release build the default project properties general options will look like this -

    and the Linker Optimization options will look like -

    Change the general properties to this -

    and so then the Linker optimization options should appear as -

    • Marked as answer by CP Hager Friday, January 18, 2019 3:49 PM
    Thursday, January 17, 2019 8:18 PM
  • Thanks very much. This worked.

    Friday, January 18, 2019 3:49 PM