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

Thread: Make a lightweight DLL

Hybrid View

  1. #1
    Join Date
    Dec 2011

    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,

  2. #2
    Join Date
    Nov 2000
    Voronezh, Russia

    Re: Make a lightweight DLL

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

  3. #3
    Join Date
    Dec 2011

    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center