CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2010
    Posts
    105

    Question msvcr100.dll missing problem

    I'm using VC 2010 to write Win32 console application. I find that it depends on "msvcr100.dll". But the target machine that runs my application has no VC 2010 installed so "msvcr100.dll" can't be found. This causes run time error.



    Is there anyway in VC 2010 that I could include msvcr100.dll into the application binary during compiling and/or linking?



    Thanks!

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: msvcr100.dll missing problem

    Try setting the "Runtime library" setting in the project properties of the release configuration under "Configuration properties -> C/C++ -> Code generation" to "Multithreaded (/MT)" instead of "Multithreaded DLL (/MD)".

    HTH
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: msvcr100.dll missing problem

    Also build for release.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  4. #4
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: msvcr100.dll missing problem

    Quote Originally Posted by S_M_A View Post
    Also build for release.
    I suppose he did. Wouldn't it have asked for msvcr100d.dll otherwise?
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  5. #5
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: msvcr100.dll missing problem

    Quote Originally Posted by acppdummy View Post
    I'm using VC 2010 to write Win32 console application. I find that it depends on "msvcr100.dll". But the target machine that runs my application has no VC 2010 installed so "msvcr100.dll" can't be found. This causes run time error.



    Is there anyway in VC 2010 that I could include msvcr100.dll into the application binary during compiling and/or linking?



    Thanks!
    You need to install the VC++ 2010 Redistributable package. Please see this FAQ for more: http://www.codeguru.com/forum/showthread.php?t=494136.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  6. #6
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: msvcr100.dll missing problem

    True Eri523. You've got sharp eyes!

    And I read your post waaaay to quick... just noticed the last part about static linking...
    Last edited by S_M_A; December 20th, 2010 at 03:58 PM.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  7. #7
    Join Date
    Nov 2010
    Posts
    105

    Question Re: msvcr100.dll missing problem

    Thank you all!

    I was trying to avoid installing too much stuff on the client machine so I was hoping to include everything in a single ".exe" file without having to install the redistributable.

    I tried setting "Multithreaded (/MT)" but the linker came back with a bunch of errors about "msvcr100.dll" - functions such as malloc(), sprintf() ... were duplicated. Then I remembered the FLTK library was compiled with "Multithreaded DLL (/MD)". Before I go ahead manually changing the 70 some odd projects in the library from /MD to /MT, is there an easier way to mass edit/change properties of all projects in a VC "solution"? Thanks!

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: msvcr100.dll missing problem

    The "easier way" was mentioned by cilu in the post#5.
    Victor Nijegorodov

  9. #9
    Join Date
    Oct 2009
    Posts
    577

    Smile Re: msvcr100.dll missing problem

    Quote Originally Posted by acppdummy View Post
    Thank you all!

    I was trying to avoid installing too much stuff on the client machine so I was hoping to include everything in a single ".exe" file without having to install the redistributable.

    I tried setting "Multithreaded (/MT)" but the linker came back with a bunch of errors about "msvcr100.dll" - functions such as malloc(), sprintf() ... were duplicated. Then I remembered the FLTK library was compiled with "Multithreaded DLL (/MD)". Before I go ahead manually changing the 70 some odd projects in the library from /MD to /MT, is there an easier way to mass edit/change properties of all projects in a VC "solution"? Thanks!
    You could write a script or a little tool which makes the changes in the .vcproj files. You even could use the macro recorder/replace function of Visual Studio for that by searching for all the .vcproj files and do the requested change (look at one of the files before and after doing that setting) in the studio.

    Another, probably easier way is to use an older version of Visual Studio, e. g. VS2005 (VC8). For that it is very unlikely taht there is still a target computer which doesn't have msvcr80.dll installed.

  10. #10
    Join Date
    May 2009
    Location
    Bengaluru, India
    Posts
    460

    Cool Re: msvcr100.dll missing problem

    Quote Originally Posted by acppdummy View Post
    Thank you all!

    I was trying to avoid installing too much stuff on the client machine so I was hoping to include everything in a single ".exe" file without having to install the redistributable.

    I tried setting "Multithreaded (/MT)" but the linker came back with a bunch of errors about "msvcr100.dll" - functions such as malloc(), sprintf() ... were duplicated. Then I remembered the FLTK library was compiled with "Multithreaded DLL (/MD)". Before I go ahead manually changing the 70 some odd projects in the library from /MD to /MT, is there an easier way to mass edit/change properties of all projects in a VC "solution"? Thanks!

    1) how did you resolve these errors than after you changed /MT?
    2) what is this FLTK library?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured