Make a lightweight DLL
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Make a lightweight DLL

  1. #1
    Join Date
    Dec 2011
    Posts
    4

    Question Make a lightweight DLL

    Hi experts,
    I'm making a DLL with Visual C++ 2010 on Win32.
    The thing is that I have to distribute this DLL so everyone could be able to download it over the internet and then copy it to someplace in his hard drive (later this DLL will by used by a JAVA applet).

    So, as you can imagine I need this library to be as lightweight as possible. The compiled library weights 40KB. But to make it work, the user must have installed Visual C++ Redistributable 2010, which weights about 5MB.

    So, the question is: Can I pack everything in a single file, or include just the files that I need?? I mean, generate a single DLL with everything it needs inside it.

    I hope you can help me ASAP.
    Sorry for my poor English.
    Best regards,
    Jorge.

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    5,923

    Re: Make a lightweight DLL

    You need to built the dll with CRT statically linked, i.e. use /MT instead of /MD.
    Best regards,
    Igor

  3. #3
    Join Date
    Dec 2011
    Posts
    4

    Re: Make a lightweight DLL

    Yes, I did that and worked.
    Thank you for your answer, you've been a great help.

    Best regards, Jorge.

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center