Visual C++ dilemma
Results 1 to 8 of 8

Thread: Visual C++ dilemma

  1. #1
    Banned
    Join Date
    Oct 2002
    Posts
    121

    Visual C++ dilemma

    Hi there,

    just a quick question regarding Microsoft Visual C++

    Ive made a program that builds and compiles fine and the .exe file generated runs perfectly well on my computer.

    When i tried to send the .exe file to a friend, he couldn't get it to work as there was a missing .dll file.

    Any1 know how i can make the .exe file independant for use on any machine??


    Thanks !!

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    Don't use custom dll

    IF I rememnber my VC correctly there is a package builder that comes with the visual enviroment.. its under the tools menu in start-programs-visual studio. That has a way of packageing your exe with all of its dependancies.
    Who is more trustworthy then all of the gurus or Buddha’s?

  3. #3
    Senior Member
    Join Date
    Nov 2001
    Posts
    472
    bballad, that deployment app works only for visual basic programs. But there are other installers... Suddenly can't remember any, though

    ChrisWuk, what you can do is check out Dependency Walker (www.dependencywalker.com), a program that checks the dll dependencies of an exe. Then you can look up all the needed dlls.

    In case the missing dll is a mfc dll, there is an option in visual studio to statically link to mfc. Your exe will be bigger, but you don't need to supply the mfc dll. You can choose this option when you first create an mfc program - in VS7, under application type -> use of mfc.
    ---
    proactive

  4. #4
    Banned
    Join Date
    Oct 2002
    Posts
    121
    It is a mfc .dll, so are u saying i have to start the coding and design again if i want it to be independant

    There must be a way around this, im using Visual C++ version 6

  5. #5
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    Originally posted here by proactive
    bballad, that deployment app works only for visual basic programs. But there are other installers... Suddenly can't remember any, though

    ChrisWuk, what you can do is check out Dependency Walker (www.dependencywalker.com), a program that checks the dll dependencies of an exe. Then you can look up all the needed dlls.

    In case the missing dll is a mfc dll, there is an option in visual studio to statically link to mfc. Your exe will be bigger, but you don't need to supply the mfc dll. You can choose this option when you first create an mfc program - in VS7, under application type -> use of mfc.
    I had forgoten that it only worked with VB...oh well.
    there is a dependancy checker bundled in with visual studieo also in the tools list...as for Chris's problem i think there is actualy a packager built into vc, if not then there are third party packagers like install sheild.

  6. #6
    Banned
    Join Date
    Oct 2002
    Posts
    121
    install shield? Doi just have to point it i nthe direction of the .exe file to make it work?

    I can't find anything in Visual studio to help me !

    Incase its needed, the missing .dll is called msc42d.dll

    Any help is apprciated !!!

  7. #7
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    Unfortunitly I have never used install sheild so I am not sure on how it works...you could always figure out what directory the .dll is in (probably windows/system) copy it form your system and then put it in the right directory on his (this could be done in a zip that preserved directory structure I think...should work never tried it)
    Who is more trustworthy then all of the gurus or Buddha’s?

  8. #8
    Senior Member
    Join Date
    Nov 2001
    Posts
    472
    I just fired up my VS7, and I don't think you have to start from scratch to statically link in VS6. At least in VS7, you can right click your project - choose properties - and in the general settings tab, change the setting "Use of MFC".
    ---
    proactive

Posting Permissions

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