Visual Studio fails to compile because of large binary data



I am embedding some impulse responses in the plugin (using a slightly altered version of the binary builder code).

However, as soon as there are a few more responses (not unreasonably much, the audio files are 9.2MB in total and the resulting binary data cpp file is 40MB big), the Visual Studio compiler fails because of error 1060 (out of heap space).

My machine has 16GB memory (and I am running on 64bit of course), so I can’t imagine that 40MB source code will explode the heap.

On the other hand, I noticed that the Introjucer / Projucer sometimes divides it’s binary data into multiple files. Has this something to do with this issue (then I’ll try to add this function to my code too).

Is there a practical limit how big the binary data file should be (I could also store the impulses in a application data folder, but I would prefer embedding them)


Yeah, this is why the Projucer splits up its files - some compilers just don’t scale very well in compiling large amounts of data.


At the risk of a small amount of hassle - but with loads of data it might be worth it.

I think you could link the data directly into object files on each platform, turn them into a library and link that against your JUCE project, thus avoiding the compiler entirely?

Might make builds a touch faster sometimes as well …


This is too much C++ voodoo for my taste :slight_smile:

I think I’ll get along with splitting the files or using a data file in the App data folder, depending on the size.