Hi, I went to fedora 36 beta 64bit x86. I installed all dependancies. I cloned juce from github.
i’m on:
~/Projects/JUCE/examples/DemoRunner/Builds/LinuxMakefile/
$ make
Compiling DemoPIPs1.cpp
In Datei, eingebunden von ../../../../modules/juce_gui_basics/juce_gui_basics.h:271,
von ../../../../modules/juce_analytics/juce_analytics.h:55,
von ../../JuceLibraryCode/JuceHeader.h:16,
von ../../Source/Demos/DemoPIPs1.cpp:26:
../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h: In Elementfunktion »void juce::ComponentPeer::setAppStyle(Style)«:
../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h:504:18: Fehler: »exchange« ist kein Element von »std«
504 | if (std::exchange (style, s) != style)
| ^~~~~~~~
make: *** [Makefile:113: build/intermediate/Debug/DemoPIPs1_5b52b434.o] Fehler 1
I don’t get why this don’t build with c++14? Do I need to set a global c++ version somehow?
Thanks for looking at this.
Looking at the DemoRunner’s Makefile in the current version of JUCE, the -std=c++14
flag is indeed being passed to the compiler.
What compiler/version are you using?
KottVV
April 8, 2022, 2:04am
3
it was moved to utility
std::exchange - cppreference.com
opened 06:23AM - 05 Apr 22 UTC
### Detailed steps on how to reproduce the bug
I try to complie JUCE 6.1.6 on F… edora 36 Beta with gcc-12 and I've got an error during compilation:
```
Compiling IOConfigurationWindow.cpp
g++ -MMD "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules -Os -DJUCER_ENABLE_GPL_MODE -O0 -fPIE -g -std=c++14 -DJUCER_ENABLE_GPL_MODE -O0 -fPIE -g -std=c++20 "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" -o "build/intermediate/Release/IOConfigurationWindow_d71a5732.o" -c "../../Source/Plugins/IOConfigurationWindow.cpp"
In file included from ../../../../modules/juce_gui_basics/juce_gui_basics.h:271,
from ../../../../modules/juce_audio_processors/juce_audio_processors.h:57,
from ../../JuceLibraryCode/JuceHeader.h:19,
from ../../Source/Plugins/IOConfigurationWindow.cpp:26:
../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h: In member function 'void juce::ComponentPeer::setAppStyle(Style)':
../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h:504:18: error: 'exchange' is not a member of 'std'; did you mean 'std::__atomic_impl::exchange'?
504 | if (std::exchange (style, s) != style)
| ^~~~~~~~
In file included from /usr/include/c++/12/atomic:41,
from ../../../../modules/juce_core/system/juce_StandardHeader.h:48,
from ../../../../modules/juce_core/juce_core.h:204,
from ../../../../modules/juce_audio_basics/juce_audio_basics.h:54,
from ../../JuceLibraryCode/JuceHeader.h:16:
/usr/include/c++/12/bits/atomic_base.h:976:7: note: 'std::__atomic_impl::exchange' declared here
976 | exchange(_Tp* __ptr, _Val<_Tp> __desired, memory_order __m) noexcept
| ^~~~~~~~
make: *** [Makefile:114: build/intermediate/Release/IOConfigurationWindow_d71a5732.o] Error 1
make: *** Waiting for unfinished jobs....
```
### What is the expected behaviour?
Compilation should went fine
### Operating systems
Linux
### What versions of the operating systems?
Fedora 35 Beta
### Architectures
x86_64
### Stacktrace
```shell
Compiling IOConfigurationWindow.cpp
g++ -MMD "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules -Os -DJUCER_ENABLE_GPL_MODE -O0 -fPIE -g -std=c++14 -DJUCER_ENABLE_GPL_MODE -O0 -fPIE -g -std=c++20 "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" -o "build/intermediate/Release/IOConfigurationWindow_d71a5732.o" -c "../../Source/Plugins/IOConfigurationWindow.cpp"
In file included from ../../../../modules/juce_gui_basics/juce_gui_basics.h:271,
from ../../../../modules/juce_audio_processors/juce_audio_processors.h:57,
from ../../JuceLibraryCode/JuceHeader.h:19,
from ../../Source/Plugins/IOConfigurationWindow.cpp:26:
../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h: In member function 'void juce::ComponentPeer::setAppStyle(Style)':
../../../../modules/juce_gui_basics/windows/juce_ComponentPeer.h:504:18: error: 'exchange' is not a member of 'std'; did you mean 'std::__atomic_impl::exchange'?
504 | if (std::exchange (style, s) != style)
| ^~~~~~~~
In file included from /usr/include/c++/12/atomic:41,
from ../../../../modules/juce_core/system/juce_StandardHeader.h:48,
from ../../../../modules/juce_core/juce_core.h:204,
from ../../../../modules/juce_audio_basics/juce_audio_basics.h:54,
from ../../JuceLibraryCode/JuceHeader.h:16:
/usr/include/c++/12/bits/atomic_base.h:976:7: note: 'std::__atomic_impl::exchange' declared here
976 | exchange(_Tp* __ptr, _Val<_Tp> __desired, memory_order __m) noexcept
| ^~~~~~~~
make: *** [Makefile:114: build/intermediate/Release/IOConfigurationWindow_d71a5732.o] Error 1
make: *** Waiting for unfinished jobs....
```
### Plug-in formats (if applicable)
VST3, Standalone
### Plug-in host applications (DAWs) (if applicable)
_No response_
### Testing on the `develop` branch
I have not tested against the `develop` branch
### Code of Conduct
- [X] I agree to follow the Code of Conduct
1 Like
reuk
April 11, 2022, 12:59pm
4
Thanks, that’s fixed here:
committed 02:43PM - 06 Apr 22 UTC
1 Like