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

    [RESOLVED] I tried to use my program on another computer...

    Hello all,

    I have just finished a port scanner that I made for fun and practice. I was fairly proud of it as it was my first multi-threaded program(up to 1002 threads!!! ). So naturally I wanted to go show it to my networking buddy.

    I threw the app on his computer, ran it, and -POW- I got hit with a 'MSVCP100.dll cannot be found.' error message.

    After doing a little research i found that applications developed in Visual C++(I'm using 2010 express) using STL are often dependent on this DLL. So my initial thought was to move the DLL with the program and drop it in his system32 folder. Well come to find out I don't even have the DLL on my computer. I have similarly named ones such as MSVCR70.dll, but not that specific one.

    I think it is worth mentioning that he is running XP and I'm on Vista. Could different OS's search for different DLL's for the same information? And if so, how do I know which DLLs to include to make the app portable? I'm really not sure what is going on here so any info would be appreciated.

    Obviously it would be great if my app could be independent of this DLL all together...
    Last edited by Austin.Soucy; January 18th, 2011 at 10:07 AM.

  2. #2
    Join Date
    Apr 2008
    Posts
    118

    Re: I tried to use my program on another computer...

    "Obviously it would be great if my app could be independent of this DLL all together... "

    This can be done if you compile statically. VS2010 will have buried in the menus somewhere the option to compile statically.

  3. #3
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: I tried to use my program on another computer...

    Project Properties -> C/C++ -> Code Generation -> Runtime Library -> select "Multithreaded".

  4. #4
    Join Date
    Oct 2009
    Posts
    577

    Smile Re: I tried to use my program on another computer...

    Alternatively you could install VS2010 runtime environment at the target computer (which would install the missing dlls). You can download the setup for that from MS support. I even heard from people which add that package to their own setup.

    If you don't want a separate setup, you may look for a folder 'redist' within your VS2010 installation paths. It should contain all relevant dlls and resources you would need to add to your own setup. You firstly could put them into the folder where your own executable was located. That way you wouldn't need access rights to system32 folder and the system would use your dlls in case they were not already in memory.

  5. #5
    Join Date
    Apr 2008
    Posts
    725

    Re: I tried to use my program on another computer...

    he can't use setup projects because he's onyl using express version

  6. #6
    Join Date
    Oct 2009
    Posts
    577

    Smile Re: I tried to use my program on another computer...

    Quote Originally Posted by Amleto View Post
    he can't use setup projects because he's onyl using express version
    Thanks for the information but installing the runtime environment is free and there are enough free setup programs available.

    I wonder whether the express version allows static compilation at all. Does it really include the needed static libraries for all useable components?

    And what is when the OP is using third-party dlls which themselves are dependent on dlls?

  7. #7
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: I tried to use my program on another computer...

    Quote Originally Posted by itsmeandnobodyelse View Post
    I wonder whether the express version allows static compilation at all.
    Yes.

  8. #8
    Join Date
    Oct 2010
    Posts
    68

    Re: I tried to use my program on another computer...

    Thanks for the replies...I won't have a chance to try anything until the day after tomorrow but I will post my results when I do.

  9. #9
    Join Date
    Oct 2010
    Posts
    68

    Re: I tried to use my program on another computer...

    The program works now!

    Unfortunately I was not able to take a structured approach to it and figure out which solution was the one I needed(it may have been them all for all I know)...But it works now, thank you all for the input

  10. #10
    Join Date
    Oct 2010
    Posts
    68

    Re: I tried to use my program on another computer...

    I understand what is going on here now...

    For anybody else that is having this issue here is a great thread discussing .NET dependency and static compilation:

    http://social.msdn.microsoft.com/for...-162dda39580a/

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