Build fails on fedora (wrong c++ version)

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?

it was moved to utility std::exchange - cppreference.com

1 Like

Thanks, that’s fixed here:

1 Like