Tracktion Engine module causes 873 errors when included

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

Have you also added the tracktion_graph module?
If you’re using the PJ it should warn you about that, if you’re using CMake, copy how the libraries are added by the examples.

You will need to use C++17 to compile tracktion_engine.

never even thought to copy the example inclusions. i’ll give it a try now. thanks

unfortunately i cannot seem to figure this out. if you would be so kind, could you let me know of the right way to set up tracktion with juce? the correct folders, files and such. thanks

Are you using cmake or the Projucer?

Also, make sure you’re using the develop branch of tracktion_engine?

this is the one i’ve cloned:

$ git clone --recurse-submodules https://github.com/Tracktion/tracktion_engine.git

i then ran the generate_examples and in my command line, directed to

cmake ./StepSequencerDemo/

i then open the solution in VS19, built the project and it ran as expected.

it is when i try to use Projucer to include

tracktion_engine/modules/tracktion_engine

i run into problems. either juce tells me that it could not find the module or it imports it and says “include dependencies” which i do, then open it in VS19 when i run into a huge list of errors.

i’ve fixed it. thanks for the help.

i deleted my Tracktion folder library and started from scratch in another directory. It was directly in my C drive so maybe there was some problems loading with permissions. I re-downloaded it to my E drive and rather than use CMake i used JUCE with the *.h and it worked perfectly. then i created a new project and to my surprise it actually worked.

for anyone else having issues like this, it may have something do to with folder protections. Possibly from Windows or Malwarebytes. Seemed like moving the directory with clean install was the fix. :slight_smile: