Upgrading JUCE and building Android = 'threadEntryProc' is undeclared identifier?

I can’t seem to wrap my around the cause.

The errors:

In file included from [...]\submodules\JUCE\modules\juce_core\juce_core.cpp:239:
[...]\submodules\JUCE\modules\juce_core\native\juce_android_Threads.cpp:369:64: error: use of undeclared identifier 'threadEntryProc'
In file included from [...]\JuceLibraryCode\include_juce_core.cpp:9:
In file included from [...]\submodules\JUCE\modules\juce_core\juce_core.cpp:239:
[...]\submodules\JUCE\modules\juce_core\native\juce_android_Threads.cpp:370:44: error: no member named 'get' in 'std::atomic<void *>'

The DemoRunner doesn’t suffer from this. And FWIW, I’m using the Projucer.


I suppose there are 2 errors, because std::atomic<void*>::get() is not a valid API. Use load instead?

I’m not sure where threadEntryProc is supposed to come from:

bool Thread::createNativeThread (Priority)
{
    if (isRealtime())
    {
       #if JUCE_ANDROID_REALTIME_THREAD_AVAILABLE
        threadHandle = (void*) juce_createRealtimeAudioThread (threadEntryProc, this);
        threadId = (ThreadID) threadHandle.load();
        return threadId != nullptr;
       #else
        jassertfalse;
       #endif
    }

Ok so for whatever reason, explicitly setting Oboe’s usage to “Enabled” with the Projucer causes the build error with Android:
image

Doing this with DemoRunner shows the problem.

After faffing about and commenting the realtime audio thread things, I got to building and running. Problem here is that my app is showing a black screen now. We use OpenGL… but toggling OpenGL with the DemoRunner works fine. Argh!

Sounds familiar :slight_smile:

It seems to be a problem with the Projucer. I found that setting JUCE_USE_ANDROID_OBOE to “Default (Enabled)” works fine and OBOE is indeed enabled. It’s the “Enabled” setting all by itself which causes problems.

Good to know it’s not just me!

I’ve got a fix for this on the way.

2 Likes

This issue should now be fixed on develop:

Thanks! I’ll give it a whirl today and will report back if anything.

Edit: seems to work here!