Build errors for Android not seen in win/osx/iOS


#1

Hi, getting these unresolveds when building Android:

C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:311: error: undefined reference to 'juce::FileChooser::browseForFileToOpen(juce::FilePreviewComponent*)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:372: error: undefined reference to 'juce::FileChooser::browseForFileToSave(bool)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:420: error: undefined reference to 'juce::FileChooser::browseForFileToOpen(juce::FilePreviewComponent*)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:432: error: undefined reference to 'juce::FileChooser::browseForFileToSave(bool)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:507: error: undefined reference to 'juce::FileChooser::browseForDirectory()'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:528: error: undefined reference to 'juce::FileChooser::browseForFileToOpen(juce::FilePreviewComponent*)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:576: error: undefined reference to 'juce::FileChooser::browseForDirectory()'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/Presets.cpp:596: error: undefined reference to 'juce::FileChooser::browseForFileToSave(bool)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/SeqUI.cpp:684: error: undefined reference to 'juce::FileChooser::browseForFileToOpen(juce::FilePreviewComponent*)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/SeqUI.cpp:704: error: undefined reference to 'juce::FileChooser::browseForFileToSave(bool)'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/SeqUI.cpp:784: error: undefined reference to 'juce::FileChooser::browseForDirectory()'
C:\Users\leehu\Development\cpp\JUCE\Projects\MIDISynthLib\Source/SeqUI.cpp:795: error: undefined reference to ‘juce::FileChooser::browseForDirectory()’

Also, errors with the following call unless the two defaulted parameters at the end are explicitly passed:

	int res = AlertWindow::showOkCancelBox( AlertWindow::AlertIconType::QuestionIcon, "Discard Changes", "Changes made to this preset will be discarded if you continue", "Ok", "Cancel", nullptr, nullptr  );

Cheers


#2

I’m guessing the file stuff may not have implementations on Android??


#3

I’ve #defined all the filechooser stuff out for now, but still have:

…/…/…/…/…/…/…/…/…/…/…/JUCE/modules\juce_gui_basics/native/juce_android_Windowing.cpp:40: error: undefined reference to ‘juce_CreateApplication()’


#4

These errors occur if you trying to use modal loops. Android does not support modal loops (i.e.JUCE_MODAL_LOOPS_PERMITTED is zero).

You’ll get this error if you trying to build a static library on Android. A fix for this is on the way.


#5

Hi, yes, it’s in a static library… thanks, will test when fix uploaded.


#6

There is a preliminary fix for the static library bug. We will be adding more features to the Projucer to make it easier to include multi-architecture static libraries in other Android projects.


#7

still seeing the same error unfortunately…


#8

Exactly which error? Modal loops will probably never be supported on Android - so you will need to avoid calling methods like browseForFileToOpen in your code. In any case, using modal loops is not recommended anyway.

However, the fix on develop should have gotten rid of the juce_CreateApplication link-error.


#9

Hi, I was referring to the juce_CreateApllication link error - I’m still seeing this after pulling the latest code…


#10

That’s odd. You re-compiled the Projucer and re-saved your project? Getting linker errors isn’t even possible when building static libraries (as the linker will not try to resolve undefined symbols) so I don’t even know how this error could come up.


#11

I’ll try rebuilding everything from scratch…