Which dll contains CTime?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Which dll contains CTime?

  1. #1
    Join Date
    Apr 2003
    Location
    North Carolina
    Posts
    167

    Which dll contains CTime?

    In my app, I used CTime and CTimeSpan. And I want to distribute my app. I choose MFC dll as shared in order to get a small .exe. How can I know which dll I need to run my app in a new env? THANK YOU!

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,253
    In theory, you don't need to know which dll provides which feature because your clients should automatically have copies of all the dll's they need on their system. They're installed with the standard distributions of Windows. The only times you need to distribute a dll are either when you built it yourself or if your app only works in debug mode. However, you're not allowed to distribute debug versions of the standard Microsoft dll's; it contravenes the license agreement.

    Have you had problems trying to make your app work on someone else's PC or were you just asking out of curiosity?
    "A problem well stated is a problem half solved. - Charles F. Kettering

  3. #3
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,051

    Dependency Walker

    Usually, it is not needed to redistribute the MFC dll's if your executable is a release buld.
    I said usually, because this is not a rule.
    Anyhow, you don't need to know in which dll is located CTime or whatever.
    Just open the executable in the Dependency Walker tool, and see what DLL's are required.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  4. #4
    Join Date
    Dec 2003
    Location
    St. Cugat - Catalunya
    Posts
    441
    In theory, you don't need to know which dll provides which feature because your clients should automatically have copies of all the dll's they need on their system.
    I had been told just a few days ago in this same forum to distribute (or link statically) msvcr70.dll because VC++.NET needs new libraries not yet on Windows systems.

  5. #5
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,253
    At a guess I'd say you were probably advised correctly - but the poster didn't say anything about .NET.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  6. #6
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,051
    Originally posted by John E
    At a guess I'd say you were probably advised correctly - but the poster didn't say anything about .NET.
    True, but it's nothing bad to find out more. Generally, VS6 is no more available on the market, so everybody must think about next...
    Originally posted by DeepButi
    I had been told just a few days ago in this same forum to distribute (or link statically) msvcr70.dll because VC++.NET needs new libraries not yet on Windows systems.
    Right, except Windows XP (XP already has MFC70.DLL, mfc70u.dll, MSVCR70.DLL,...)
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  7. #7
    Join Date
    Dec 2003
    Location
    St. Cugat - Catalunya
    Posts
    441
    Originally posted by ovidiucucu
    True, but it's nothing bad to find out more. Generally, VS6 is no more available on the market, so everybody must think about next...
    That was exactly my intention when posting ... caution when using version .NET

    Right, except Windows XP (XP already has MFC70.DLL, mfc70u.dll, MSVCR70.DLL,...)
    Not sure about that. I detected the problem when using a XP system that did not have msvcr70.dll

  8. #8
    Join Date
    Jun 2002
    Posts
    395

    Re: Which dll contains CTime?

    Originally posted by love2mao
    In my app, I used CTime and CTimeSpan. And I want to distribute my app. I choose MFC dll as shared in order to get a small .exe. How can I know which dll I need to run my app in a new env? THANK YOU!
    If the only MFC functions you used were CTime and CTimeSpan, just link statically. Only the functions actually used will be included in your program, so your exe should still be pretty small.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center