Thread: Using .exe on another comp, VC++ .net

  1. #1
    Noobski
    Guest

    Question Using .exe on another comp, VC++ .net

    I tried sending a program I made to my girlfriend and she can't run it. An error pops up saying there's a missing dll. I'm using visual c++ .net and using the mfc stuff, nothing too weird. This seems kinda a noob question, sorry! :-)

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    I is impossible to tell you what to do unless you provide some info on the program you sent her. What dll is it she's missing? She may have an older version of windows or something.

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    43
    msvcp60.dll or something like that... It should be in C:\Windows\System
    Programmer's Law:

    If your program doesn't work, look for the part that you didn't think was
    important.

  4. #4
    Noobski
    Guest
    That's the one Derek. But why doesn't she have it? We both have win xp. What happens if I make a program for a customer and they dont have that file? Do I need to make an install package that always checks for that?

    Thanks for help

  5. #5
    Registered User
    Join Date
    May 2003
    Posts
    43
    I think its installed with the compiler. You'll have to give her the .dll too if you want her to be able to run your program.

    And I think you'd have to make the dll part of the install file...
    Last edited by Derek5272; 05-07-2003 at 10:13 PM.
    Programmer's Law:

    If your program doesn't work, look for the part that you didn't think was
    important.

  6. #6
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Look through the projects options. There should be a linkage switch for the MFC. You linked it dynamically, which means it has to be on your target platform. This will only be the case if prior installations put it there, it's not on a normal, blank windows system. If you need to be sure your application runs on systems without MFC preinstalled, link statically.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    msvcp60.dll has nothing to do with MFC, it's the dll version of MS's standard C++ library.

    Anyway, there should be a tool called "Dependency Viewer" (depends.exe) in the tools directory of Visual Studio. Start it, load your MFC exe file into it and then choose "Profile..." (or something like that). The viewer will start your app and monitor exactly which DLLs your app needs.

    Most of those it lists come with windows, but it will give you an idea what you might need to distribute with your app.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Registered User
    Join Date
    May 2003
    Posts
    5
    (First post here, hi guys )

    Are you giving her the release build of the program ? Because the debug version of those DLLs is not (and shouldn't really) installed by default.

  9. #9
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    This is for VS 6, but it shouldn't be too different

    Project ---> Settings ---> instead of Use MFC in a Shared DLL, change it to Use MFC in a Static Library

    the executable will be 1 meg + tho doign it this way.

  10. #10
    cgoat
    Guest
    Send her to windowsupdate.microsoft.com and have her download the .NET framework.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    .Net framework doesn't matter for MFC. The only way it could was if he needed the GDI+ dll.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    cgoat
    Guest
    I was guessing that the .NET framework would include the required DLLs for running anything compiled in VC.NET, including MFC programs.

    Unfortunately I haven't had any experience with .NET yet... I took a chance at being wrong, oh well.

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    No, the .Net framework is only for Managed applications, things compiled from C#, VB.Net or Managed C++ (and the various minor .Net languages).

    Everything else VC++ compiles is plain old machine code.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    >>Are you giving her the release build of the program ?

    Theres your problem i guarantee it.

  15. #15
    Noobski
    Guest
    I dont quite understand what you mean by release build. I just build it and give her the .exe file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Difference in MSVC 6 & MS VC .Net
    By passionate_guy in forum C Programming
    Replies: 1
    Last Post: 01-23-2006, 06:39 AM
  2. .EXE s in .NET
    By -JM in forum C++ Programming
    Replies: 4
    Last Post: 12-06-2005, 12:42 AM
  3. Porting code from VC++6 to VC .NET??
    By dug in forum C++ Programming
    Replies: 10
    Last Post: 01-31-2005, 11:42 AM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM