Search code examples
c++visual-studiostatic-librariesbuilding

Static library nearly 400MB in size


I'm having a bit of a problem trying to build a library called Assimp statically. The problem I'm having is that that Visual Studio generates really large library files when building Assimp statically.

Here's a list of the assimp library file sizes for each build:

  • Debug X64: 381MB
  • Release X64: 66MB
  • Debug X86: 253MB
  • Release X86: 38MB

In total the project files has over 700MB of libaray files, only for Assimp. The other static libraries that my project uses are all under 10MB, most of them under 5MB so something must be very wrong with the Assimp ones.

I used CMAKE to generate the project files, and I used Visual Studio Community 2017 to generate the library files.

What could cause the library file to be so big?


Solution

  • Nothing is wrong. Your release builds are 38MB and 66MB in size, which is in line with what you're expecting. It's common for debug builds to be much bigger than release builds, because of the extra debugging information contained within.