Tracktion Engine - compilation errors and demo example problems on Windows

Hey there

I’ve finally got around to looking at Tracktion Engine and am having difficulties on Windows.

Here’s what I’ve tried.


  • 1 - Tutorial on github

If I follow these instructions, cloning the repo etc and I can get as far as running build_examples.bat. Then I get the error:
Get-Content : Cannot find path 'C:\git\tracktion_engine\examples\projects\tracktion_graph_PerformanceTests\tracktion_graph_PerformanceTests\tracktion_graph_PerformanceTests.jucer' because it does not exist.

And indeed it does not exist. That double tracktion_graph_PerformanceTests in the path is erroneous. If I manually create it I get Error when saving: At least one of your JUCE module paths is invalid! which isn’t a massive surprise, but before going down that rabbit hole I looked at the .bat files. I can’t see where I can correct this path issue at source. Hmmm…

So leaving this aside I tried another thing.


  • 2 - Tracktion_engine as a module to a Projucer project*

With Projucer 6.0.8 Master Branch, VS2019, I created a project based on the basic GUI template. Then I added tracktion engine as a module from a specified folder, accepting all the suggested dependencies.

Having done this, even with a simple “Hello World” GUI project I got a ton of errors. I tested setting the project to C++ v17 (as a lot of errors mentioned that).

The errors reduced but I still have the following (and many more like them). I really don’t know how best to move forward:

1>C:\git\tracktion_engine\modules\tracktion_engine\plugins\external\tracktion_ExternalPlugin.h(85,90): error C2039: 'deprecatedUid': is not a member of 'juce::PluginDescription' (compiling source file ..\..\Source\Main.cpp)
1>C:\git\tracktion_engine\modules\tracktion_engine\plugins\external\tracktion_ExternalPlugin.h(85,49): error C2660: 'juce::String::toHexString': function does not take 1 arguments (compiling source file ..\..\Source\Main.cpp)
1>C:\git\tracktion_engine\modules\tracktion_engine\plugins\external\tracktion_ExternalPlugin.h(85,90): error C2039: 'deprecatedUid': is not a member of 'juce::PluginDescription' (compiling source file ..\..\Source\MainComponent.cpp)
1>C:\git\tracktion_engine\modules\tracktion_engine\plugins\external\tracktion_ExternalPlugin.h(85,49): error C2660: 'juce::String::toHexString': function does not take 1 arguments (compiling source file ..\..\Source\MainComponent.cpp)

@dave96 Hope you don’t mind me mentioning you directly, but I suspect you may well be the guy to ask about all this.

Any help, advice or suggestions would be greatly appreciated!

With best wishes

Jeff

tracktionEngine_buildErrors.txt (16.6 KB)
Here are all the errors from part 2 of my above post (after having switched to c++ v17).

Cheers, J

I’ve tried grabbing and compiling Projucer against 6.0.8, 6.0.0 and 5.4.7. I still get errors.
The best I got was using Tracktion Engine from a year ago (1.0.0), and a similarly old JUCE version. Although I was able to compile stuff, this is hardly ideal.

Can anyone confirm that they have JUCE 6.0.8 and Tracktion Engine commit #dab29c2ea (Master branch - current) running on Windows please?

The “Master” branch is pretty far out of date. You should try the “Develop” branch.

Hey @bwall thanks for your reply. Funnily enough I just started looking at the Dev branch. I thought I was using too new of a JUCE library, but it might actually have been too old, like you say. I’m not getting those errors for adding the module on a dev branch 6.0.8 which is great! Now I’m about to test the examples. Cheers :slight_smile:

Ok, after thrashing around like a muppet I now have some answers, which may help others.

I wanted to achieve the following:

  • Running on Windows
  • Already running Projucer built from a JUCE 6.0.X repo cloned locally. Didn’t want to build another Projucer and have another JUCE repo clone lying around on disk. *
  • Use Visual Studio 2019 (not 2017)
  • Use the demo tutorials

If the above applies to you the follow steps might be of interest:

  1. Clone tracktion_engine locally.
  2. Figure out what supplied JUCE commit was used by the tracktion_engine commit you want. I did this with SourceTree, examining the tracktion_engine’s JUCE submodule and making a note of the commit hash. In my case it was 04fdc4c2(…etc)
  3. On my preferred JUCE clone, move the head to the corresponding commit, and for safety I rebuilt Projucer accordingly. *
  4. The tutorial/examples have a script: tracktion_engine\tests\windows\build_examples.bat. Line 65 uses %EXAMPLE_NAME% as a directory as well as file name. Omit this intermediate directory to prevent projucer file not found errors.
  5. Search/replace VisualStudio2017 references to VisualStudio2019
  6. For the MSBUILD_EXE= path, double check that it’s valid. For me …\MSBuild\15.0\Bin\MSBuild.exe became …\MSBuild\Current\Bin\MSBuild.exe
  7. Line 7, point to your preferred location for a juce repo
  8. Comment out (with rem) line 18, so that you don’t build Projucer again.
  9. cd c:\git\tracktion_engine\tests\windows and then build_examples.bat

I’ve attached my build_examples.bat which has the above changes in case you want to use it as a starting point.
build_examples.zip (1.1 KB)


At this point you should have Projucer project files/directories in C:\git\tracktion_engine\examples\projects
I found the quickest way to swap out the VS2017 stuff with VS2019 was to edit one line in the projucer file via a text editor.
Replace:
<VS2017 targetFolder="Builds/VisualStudio2017">
with
<VS2019 targetFolder="Builds/VisualStudio2019">


*Note: I may re-think this approach in future, but for now JUCE version that tracktion_engine wants doesn’t break anything else I have going on.

Hope this helps. You should be good to go after all this. Feel free to point out the stupid stuff I’ve done, or ask any questions.

Cheers,
Jeff

Yes, unfortunately it’s a bit difficult to track JUCE as there are sometimes breaking API changes between version numbers. As a result we recommend only using the version of JUCE the commit of Tracktion Engine is built against. You’ll see it should have passed the tests then so should certainly work with that JUCE commit.


As for scripts and MSVC locations etc. the build scripts are designed mainly for our CI servers. You can provide custom MSBuild paths by setting the MSBUILD_EXE environment variable before calling the scripts and it will use that.

However, because it’s very difficult to support all versions of all compilers, we strongly recommend using CMake to generate build files for your chosen IDE. This is the method used by our CI now and is detailed here: tracktion_engine/build at master · Tracktion/tracktion_engine · GitHub

2 Likes