X11 Windowing Fails to Compile and or Link
Opened this issue · 4 comments
Getting undefined reference when building an exported Makefile. Getting compiler errors when using waf. Latest JUCE master does not have these issues.
From Projucer makefile project
build/intermediate/Release/include_juce_gui_basics_e3f79785.o: In function `juce::getPeerFor(unsigned long, bool)':
include_juce_gui_basics.cpp:(.text+0x4a191): undefined reference to `XGetWMHints'
include_juce_gui_basics.cpp:(.text+0x4a1af): undefined reference to `XFree'
collect2: error: ld returned 1 exit status
Makefile:138: recipe for target 'build/Projucer' failed
make: *** [build/Projucer] Error 1
From Element
In file included from ../libs/compat/include_juce_gui_basics.cpp:9:
In file included from ../libs/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp:262:
../libs/JUCE/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:631:125: error: type 'std::unique_ptr<XVisualInfo, juce::(anonymous namespace)::XFreeDeleter>' does not provide a subscript operator
auto pictVisualFormat = X11Symbols::getInstance()->xRenderFindVisualFormat (display, xvinfos[i].visual);
~~~~~~~^~
../libs/JUCE/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:637:53: error: type 'std::unique_ptr<XVisualInfo, juce::(anonymous namespace)::XFreeDeleter>' does not provide a subscript operator
visual = xvinfos[i].visual;
~~~~~~~^~
2 errors generated.
Please include:
-
detailed steps on how to reproduce the bug, preferably with already
existing JUCE code such as the demo plugin or the demo code
Compile Element -
the expected behaviour
No compiler or linker errors -
the operating system
Ubuntu 18.0.04 -
the architecture (32-bit or 64-bit)
64bit -
a stack trace - if the bug causes a crash
none -
the plugin format (VST2, VST3, AU, AAX, RTAS) - if applicable
n/a -
which DAW you observed the bug in - if applicable
n/a
Make sure you have pulled the latest commits from the develop
branch of the
JUCE repo and have re-compiled the Projucer before you submit your bug. Often
we have already fixed the issue but it hasn't yet been released on the master
branch. If it's a major bug, which must be hot-fixed immediately, then we will
also accept bug reports for tagged release versions.
Can you try with c38ea34 ?
(slightly older commit before changes for vital synth and merging develop juce stuff)
Sorry it took so long. Projucer compiles fine, still getting the error building Element.
I fixed this up on latest git again. No longer have hacky workarounds, the x11 code is all from juce.
I have not modified x11 part of the code that much, and obviously the juce stuff still builds as I just made a release with it.
Excellent! Thanks.