juce_events & non-gui app


#1

I’m trying to get a simple command line audio file player running on a Raspberry Pi. For that I set up a project using juce_core, juce_audio_devices, juce_audio_basics, juce_audio_formats and juce_events. juce_events is needed by juce_audio_devices according to the IntroJucer.

On Windows I was able to compile the project and play some audio file.
On Linux (Pi as well as Ubuntu) I get the following error message while linking:

Linking test
build/intermediate/Debug/juce_events_88dd09a1.o: In function `juce::InternalMessageQueue::dispatchNextXEvent()':
/home/pi/test/Builds/Linux/../../../juce/modules/juce_events/native/juce_linux_Messaging.cpp:169: undefined reference to `juce::juce_handleSelectionRequest(XSelectionRequestEvent&)'
/home/pi/test/Builds/Linux/../../../juce/modules/juce_events/native/juce_linux_Messaging.cpp:171: undefined reference to `juce::juce_windowMessageReceive(_XEvent*)'
collect2: ld returned 1 exit status
make: *** [build/test] Error 1

Chris


#2

Thanks - this should be sorted out now.


#3

Thanks Jules, it works now.

Chris


#4

Hello, I’m just starting out with JUCE and I’m having this exact same issue on Ubuntu 11.04. I set up the project with the Introjucer using the same modules you mentioned. Could you elaborate on how you were able to fix it?

EDIT: I managed to find that the 2 functions reside in the file juce_linux_Windowing.cpp file in the juce_gui_basics module. Since I’m not planning on using JUCE for GUI (I only need its MIDI functionality right now), I suppose I won’t run into any problems later on if I comment out these lines of code in juce_linux_Messaging.cpp? When doing this it links and runs fine.

if (evt.type == SelectionRequest && evt.xany.window == juce_messageWindowHandle) juce_handleSelectionRequest (evt.xselectionrequest); else if (evt.xany.window != juce_messageWindowHandle) juce_windowMessageReceive (&evt);