EDIT: i managed to reduce errors from 873 to 455 by setting /std:c++17
in visual studio
can’t figure out what i’m doing wrong, i compiled the examples perfect, opened in IDE and all was ok. the projects ran, compiled and debugged as expected.
when in JUCE, creating a new project and including “tracktion_engine” module the project loads but when i try to build, i get 873 error messages.
here is the build log:
Build started…
1>------ Build started:
1>Main.cpp
1>MainComponent.cpp
1>include_tracktion_engine_airwindows.cpp
1>include_tracktion_engine_audio_files.cpp
1>The contents of are available only with C++17 or later.
1>The contents of are available only with C++17 or later.
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_SampleBuffers.h(34,1): error C2429: language feature ‘nested-namespace-definition’ requires compiler flag ‘/std:c++17’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(27,1): error C2429: language feature ‘nested-namespace-definition’ requires compiler flag ‘/std:c++17’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\complex(43): message : see declaration of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,29): error C3646: ‘getName’: unknown override specifier (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,29): error C2059: syntax error: ‘(’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,65): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\complex(43): message : see declaration of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,39): error C3646: ‘getNameWithSharps’: unknown override specifier (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,39): error C2059: syntax error: ‘(’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,65): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\complex(43): message : see declaration of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,38): error C3646: ‘getNameWithFlats’: unknown override specifier (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,38): error C2059: syntax error: ‘(’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,65): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(73,87): error C3861: ‘getName’: identifier not found (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\complex(43): message : see declaration of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,38): error C3646: ‘getMetaEventData’: unknown override specifier (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,38): error C2059: syntax error: ‘(’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,46): error C2238: unexpected token(s) preceding ‘;’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(465,13): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\complex(43): message : see declaration of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(465,34): error C2039: ‘getMetaEventData’: is not a member of ‘choc::midi::Message’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(162): message : see declaration of ‘choc::midi::Message’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(465,25): error C7525: inline variables require at least ‘/std:c++17’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(465,50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(465,50): error C2146: syntax error: missing ‘;’ before identifier ‘getMetaEventData’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(466,1): error C2270: ‘getMetaEventData’: modifiers not allowed on nonmember functions (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(466,1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(467,5): error C3861: ‘isMetaEvent’: identifier not found (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(469,24): error C2065: ‘content’: undeclared identifier (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(471,8): error C3536: ‘totalLength’: cannot be used before it is initialized (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(475,14): error C3861: ‘data’: identifier not found (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(479,23): error C3536: ‘d’: cannot be used before it is initialized (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(479,21): error C2100: illegal indirection (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(486,49): warning C4389: ‘==’: signed/unsigned mismatch (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(492,38): warning C4018: ‘>’: signed/unsigned mismatch (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>The contents of are available only with C++17 or later.
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(495,17): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\complex(43): message : see declaration of ‘std’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(495,30): error C2065: ‘content’: undeclared identifier (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(495,29): error C2064: term does not evaluate to a function taking 2 arguments (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_SampleBuffers.h(34,1): error C2429: language feature ‘nested-namespace-definition’ requires compiler flag ‘/std:c++17’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(495,5): error C2617: ‘choc::midi::getMetaEventData’: inconsistent return statement (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(465): message : see declaration of ‘choc::midi::getMetaEventData’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(508,33): error C2660: ‘choc::midi::printHexMIDIData’: function does not take 1 arguments (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(27,1): error C2429: language feature ‘nested-namespace-definition’ requires compiler flag ‘/std:c++17’ (compiling source file …..\Source\MainComponent.cpp)
1>The contents of are available only with C++17 or later.
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(320,20): message : see declaration of ‘choc::midi::printHexMIDIData’ (compiling source file …..\JuceLibraryCode\include_tracktion_engine_airwindows.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\random(27): message : see declaration of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,29): error C3646: ‘getName’: unknown override specifier (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_SampleBuffers.h(34,1): error C2429: language feature ‘nested-namespace-definition’ requires compiler flag ‘/std:c++17’ (compiling source file …..\Source\Main.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,29): error C2059: syntax error: ‘(’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(67,65): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\random(27): message : see declaration of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,39): error C3646: ‘getNameWithSharps’: unknown override specifier (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,39): error C2059: syntax error: ‘(’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(69,65): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\random(27): message : see declaration of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,38): error C3646: ‘getNameWithFlats’: unknown override specifier (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,38): error C2059: syntax error: ‘(’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(71,65): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(73,87): error C3861: ‘getName’: identifier not found (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,10): error C2039: ‘string_view’: is not a member of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>E:\VS\VC\Tools\MSVC\14.28.29333\include\random(27): message : see declaration of ‘std’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,38): error C3646: ‘getMetaEventData’: unknown override specifier (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,38): error C2059: syntax error: ‘(’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(216,46): error C2238: unexpected token(s) preceding ‘;’ (compiling source file …..\Source\MainComponent.cpp)
1>C:\Tracktion\tracktion_engine\modules\3rd_party\choc\audio\choc_MIDI.h(27,1): error C2429: language feature ‘nested-namespace-definition’ requires compiler flag ‘/std:c++17’ (compiling source file …..\Source\Main.cpp)
… cut short for 32000 character limit
when open, all *.cpp files are excluded from build in the tracktion_engine module, if this helps.
there are of course far too many errors to copy paste but it all amounts to roughly the same thing of “expected a symbol”, “qualified name is not allowed”, “name std has no string_view”