Get rid of Bloated runtime and executable?

Sysprogs forums Forums VisualGDB Get rid of Bloated runtime and executable?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #959
    Anonymous
    Participant

    Hi,

    so I was looking for an alternative to Microsofts compiler for my c++ applications, because I hate that my users need to install the Microsoft Visual C++ runtime to use my programs.
    I heard that MinGW would be a good solution to that problem, and while searching for information I found VisualGDB.

    I downloaded and installed it and created a new Windows project (.exe), which contains some basic main function with std::cout.
    I set the project to “Release Mode” and pressed F5, everything worked as expected.

    But when I try to run the application from the folder it says “missing libgcc_s_dw2-1.dll” and “libstdc++-6.dll”.
    I found out where they are located and was shocked when I saw that they are about 1k KB.

    Also the test application is 29kb, for a simple std::cout “HelloWorld” + 1KB DLLs?

    That’s defenitely not what I was looking for.

    I’m not used to makefiles because of Microsoft Visual Studio, do you have any suggestions how to reduce the filesize and get rid of those 2 1KB DLLs?

    Thanks in advance,
    Christopher

    #3510
    support
    Keymaster

    Hi,

    Please try adding the following flags to CFLAGS/CXXFLAGS:
    -static-libgcc -static-libstdc++
    You can read more about -static-xxx flags here: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.