DLLs

Discussion in 'C++' started by richard pickworth, Jun 4, 2005.

  1. when I try to run my app. on a different computer, I get an error, that DLLs
    are missing. How can I make my app. "stand alone"?. I am using VisC++ .Net
    Express.
    yours
    Richard
    richard pickworth, Jun 4, 2005
    #1
    1. Advertising

  2. This is off-topic here. Try the news group
    comp.os.ms-windows.programmer.tools.mfc

    There is a compiler/linker option to statically link with MFC.

    --
    EventStudio 2.5 - http://www.EventHelix.com/EventStudio
    Auto Layout and Generate Sequence Diagrams in PDF and MS Word
    EventHelix.com, Jun 4, 2005
    #2
    1. Advertising

  3. richard pickworth

    kalos Guest

    There are two ways to do this:
    The way that does exactly what you ask is to statically link your DLLs.
    I'm guessing that the DLLs that are required are MFC or something like
    that (not your own).
    You have to edit your project settings and look under linker. Here
    there should be an option to choose how to link against Microsoft
    libraries. I think the current selection will be "Using MFC as a
    Dynamic Link Library" (DLL) and you want to change it to "Using MFC as
    a Static Link Library". (You should watch out for this:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;194299)

    What happens when you do this is all of the code that you use (I
    believe it is only the code you use and not the whole DLL) is
    incorporated into your EXE. This will bloat the size of your executable
    (don't forget, big executables can be slower due to cache misses...).


    This is why you should do the second option if possibe:
    Package the required DLLs with your app. If you are using an installer
    package like InstallShield, this is no problem. Even if you are just
    using a zip package you can just include all of the DLLs required in
    the same directory as your app.
    Either way the error message should say which DLLs are missing (or it
    will tell you one at a time - you will have to add the DLL it asks for
    and then get another error message to find the next DLL). Just look on
    the developer computer for the DLLs and include a copy of them in your
    package.

    Note that if you are using InstallShield or the like, you should
    probably put the files in System32. But check the InstallShield help
    for that. (This will make sure that the files are shared and the
    space-saving attributes of DLLs are preserved.)

    -Kalos

    richard pickworth wrote:
    > when I try to run my app. on a different computer, I get an error, that DLLs
    > are missing. How can I make my app. "stand alone"?. I am using VisC++ .Net
    > Express.
    > yours
    > Richard
    kalos, Jun 4, 2005
    #3
  4. richard pickworth wrote:
    > when I try to run my app. on a different computer, I get an error, that DLLs
    > are missing. How can I make my app. "stand alone"?. I am using VisC++ .Net
    > Express.
    > yours
    > Richard
    >
    >


    Let me guess: You have compiled it as "Debug" and therefore it links against
    Debug-DLLs that are not found on "normal" systems. You can resolve it by
    compiling it as "Release"

    - Matthias Meixner
    Matthias Meixner, Jun 4, 2005
    #4
  5. actualy, I have tried building as "release" - no joy.
    richard
    "Matthias Meixner" <> wrote in message
    news:d7t6th$pjv$...
    > richard pickworth wrote:
    >> when I try to run my app. on a different computer, I get an error, that
    >> DLLs
    >> are missing. How can I make my app. "stand alone"?. I am using VisC++
    >> .Net
    >> Express.
    >> yours
    >> Richard
    >>
    >>

    >
    > Let me guess: You have compiled it as "Debug" and therefore it links
    > against
    > Debug-DLLs that are not found on "normal" systems. You can resolve it by
    > compiling it as "Release"
    >
    > - Matthias Meixner
    richard pickworth, Jun 5, 2005
    #5
  6. richard pickworth

    adbarnet Guest

    let me guess... You're working on the windows platform?

    try using the Depends tool to establish your binary dependencies.


    "richard pickworth" <> wrote in message
    news:d7v7lf$t0$-infra.bt.com...
    > actualy, I have tried building as "release" - no joy.
    > richard
    > "Matthias Meixner" <> wrote in message
    > news:d7t6th$pjv$...
    >> richard pickworth wrote:
    >>> when I try to run my app. on a different computer, I get an error, that
    >>> DLLs
    >>> are missing. How can I make my app. "stand alone"?. I am using VisC++
    >>> .Net
    >>> Express.
    >>> yours
    >>> Richard
    >>>
    >>>

    >>
    >> Let me guess: You have compiled it as "Debug" and therefore it links
    >> against
    >> Debug-DLLs that are not found on "normal" systems. You can resolve it by
    >> compiling it as "Release"
    >>
    >> - Matthias Meixner

    >
    >




    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
    adbarnet, Jun 7, 2005
    #6
  7. On Sat, 4 Jun 2005 15:53:53 +0000 (UTC), "richard pickworth"
    <> did courageously avow:

    >when I try to run my app. on a different computer, I get an error, that DLLs
    >are missing. How can I make my app. "stand alone"?. I am using VisC++ .Net
    >Express.
    >yours
    >Richard
    >

    When you're setting up the project check the box for static linking as
    opposed to dynamic linking

    Ken Wilson

    Amer. Dlx. Tele, Gary Moore LP, LP DC Classic w/P90s,
    Jeff Beck Strat, Morgan OM Acoustic,
    Rick 360/12, Std. Strat (MIM), Mesa 100 Nomad,
    Mesa F-30

    "Goodnight Austin, Texas, wherever you are."
    Rick N. Backer, Jul 12, 2005
    #7
  8. Register the DLLs with regsvr32.exe?
    yours
    Richard
    "richard pickworth" <> wrote in message
    news:d7v7lf$t0$-infra.bt.com...
    > actualy, I have tried building as "release" - no joy.
    > richard
    > "Matthias Meixner" <> wrote in message
    > news:d7t6th$pjv$...
    >> richard pickworth wrote:
    >>> when I try to run my app. on a different computer, I get an error, that
    >>> DLLs
    >>> are missing. How can I make my app. "stand alone"?. I am using VisC++
    >>> .Net
    >>> Express.
    >>> yours
    >>> Richard
    >>>
    >>>

    >>
    >> Let me guess: You have compiled it as "Debug" and therefore it links
    >> against
    >> Debug-DLLs that are not found on "normal" systems. You can resolve it by
    >> compiling it as "Release"
    >>
    >> - Matthias Meixner

    >
    >
    richard pickworth, Aug 8, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kelly G.

    How to secure my DLLs

    Kelly G., Jan 7, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    998
    Steve C. Orr [MVP, MCSD]
    Jan 8, 2004
  2. Kelly G.
    Replies:
    1
    Views:
    489
    Mark Alexander Bertenshaw
    Jan 9, 2004
  3. C Evans via .NET 247

    deploying applications and shared dlls

    C Evans via .NET 247, May 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    566
    C Evans via .NET 247
    May 23, 2005
  4. ana

    .net and dlls

    ana, Jun 27, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    466
  5. Guest

    .Net Dlls and ASP.NET app.

    Guest, Jul 11, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    497
    Yan-Hong Huang[MSFT]
    Jul 15, 2003
Loading...

Share This Page