CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2011
    Posts
    4

    How To Deploy A DLL

    All I wanted to do is make a simple DLL that I could call from VB. Last time I made a DLL was in VC++ 6.0 and it was fairly easy. Now I am trying to do the same thing in visual studio 2008 and it's changed and I an not sure how to deploy it.

    It appears one can no longer just generate a .DLL file for simple distribution. Instead, I get the following files after I build with no errors:

    The debug directory:
    BuildLog.htm
    MyDll.dll.embed.manifest
    MyDll.dll.embed.manifest.res
    MyDll.dll.intermediate.manifest
    MyDll.obj
    MyDll.pch
    MyDll.res
    mt.dep
    stdafx.obj
    vc90.idb
    vc90.pdb



    Release directory:

    MyDll.dll.intermediate.manifest
    MyDll.obj
    MyDll.pch
    MyDll.res
    mt.dep
    stdafx.obj
    vc90.idb
    vc90.pdb


    So what file is my actual DLL to be called from VB?

    How can I deploy this file?

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: How To Deploy A DLL

    None of those is dll. So, actually I have a doubt about "build with no errors".
    Last edited by Igor Vartanov; June 4th, 2011 at 02:26 PM.
    Best regards,
    Igor

  3. #3
    Join Date
    Apr 1999
    Posts
    27,449

    Re: How To Deploy A DLL

    Quote Originally Posted by TheSaint1234 View Post
    It appears one can no longer just generate a .DLL file for simple distribution.
    Wow. You mean the DLL's I compile and build every day using Visual Studio 2008 are just my imagination?

    Seriously, Visual Studio is used by thousands of programmers to build DLL's. If there was such a problem with building DLL's, thousands of programmers would have reported it and complained to Microsoft.
    Instead, I get the following files after I build with no errors:
    The debug directory:
    ...
    Release directory:
    ...
    Go to your project that builds the DLL and look at the Output name. If your DLL actually did get built, that is where it resides. Just because you have a "debug" and "release" directory doesn't mean that the final DLL is placed there.

    Regards,

    Paul McKenzie

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

    Re: How To Deploy A DLL

    Quote Originally Posted by TheSaint1234 View Post
    It appears one can no longer just generate a .DLL file for simple distribution. Instead, I get the following files after I build with no errors:

    The debug directory:
    BuildLog.htm
    MyDll.dll.embed.manifest
    MyDll.dll.embed.manifest.res
    MyDll.dll.intermediate.manifest
    MyDll.obj
    MyDll.pch
    MyDll.res
    mt.dep
    stdafx.obj
    vc90.idb
    vc90.pdb



    Release directory:

    MyDll.dll.intermediate.manifest
    MyDll.obj
    MyDll.pch
    MyDll.res
    mt.dep
    stdafx.obj
    vc90.idb
    vc90.pdb
    Looks like you're just looking for your DLL in the wrong directories. Assume you have a solution named DLLtest containing a project named MyDll which is supposed to build the DLL, then I would expect these files (which are all intermediate files) in the directories ...\Projects\DLLtest\MyDll\Debug and ...\Projects\DLLtest\MyDll\Release. However, these are intermediate output directories that never have contained anything of interest to me as long as I've been using VS 2010. With default project settings (or something similar) try to look for your DLL in the directories ...\Projects\DLLtest\Debug and ...\Projects\DLLtest\Release which should be the real output directories.

    HTH

    Ah, and... Welcome to CodeGuru!
    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
    Jun 2011
    Posts
    4

    Red face Re: How To Deploy A DLL

    Not sure why there were not there before but after deleting all the files and doing a clean/rebuild, the DLL files were finally created.

    Thanks for the replies.

  6. #6
    Join Date
    Feb 2002
    Posts
    4,640

    Re: How To Deploy A DLL

    Quote Originally Posted by TheSaint1234 View Post
    Not sure why there were not there before but after deleting all the files and doing a clean/rebuild, the DLL files were finally created.

    Thanks for the replies.
    Build error?

    Viggy

  7. #7
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: How To Deploy A DLL

    Don't forget that it's no longer the simple matter of deploying the DLL, like it used to be in VC++6. In addition, you'll need to deploy the correct C runtime files that match the manifest information embedded in your DLL. If you don't do that, there's a possibility that your app will work fine on your machine but not on somebody else's. This manifest stuff can be a bit of a minefield at first but it works well once you understand it. Do make the effort to understand it though. Ignore it at your peril..!
    "A problem well stated is a problem half solved.” - Charles F. Kettering

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