I have exhausted all troubleshooting within my scope of knowledge, and from what i can find on these forums. I have tried a different image of a different size and recompiled and get exactly the same error which leads me to believe the issue is with my implementation of the class but I have no idea what the problem is
I have compiled a binary data file using the BinaryBuilder program supplied in the extras folder of Juce, which has been placed with my project files. I have then written an #include for the header file in the JuceHeader.h file.
After declaring in my editor header file as such:
const char* imageData = BinaryData::Untitled_png;
const int imageDatasize = BinaryData::Untitled_pngSize;
Which ultimately is likely because of a prior problem I have: Projucer doesn’t compile at all for me, and never has - I get “JIT process stopped responding”. This happens on all versions of Juce and I have never bothered to fix it as I can work completely independently in Visual Studio.
Is there a workaround here? Why does the file need to be in projucer for my code to compile? Ideally I want to work in this framework without having to deal with Projucer at all.
You shouldn’t have to add anything. The declarations you put into your headers are rather confusing things than helping.
The data in BinaryData is automatically added, you find it in the section “JUCE Library Code”.
And it is included automatically in the “JuceHeader.h”
When you add source files, they are eventually duplicated.
Right nevermind it’s because I hadn’t right clicked the file and declared them binary files
Either way, I don’t understand why I have to go through projucer for this. Surely this all should be able to work independently of projucer if you wanted it to
I know, people can only appreciate the Projucer, once they tried to setup a build for 4 different targets with shared code to create the libraries in the right format, so the various plugin hosts can see them.
It might be doable and not be too hard for applications, but to set all settings so it just works is not really trivial.
So instead of having several howto pages, how to set up in your IDE of choice, the Projucer just generates a project for you, that you can flesh out.
And in fairness, it is quite common to have a tool creating your build instructions, be it auto-conf, cmake, gradle, or whatever else… it will always be the wrong choice for the majority anyway…
Fair enough, don’t really think about that at this scale - all the extra apps start to seem like roadblocks rather than helpful features
Just to clarify something, when in projucer both the Binary file header and cpp should be ticked as a binary resource? Or are both ticked as a binary resource? The manual doesn’t specifiy