"Templates cannot have 'C' linkage" build error in Qt Creator

• Jan 10, 2024 - 12:38

Hi everyone,

I am trying to build MU4 in Qt Creator but I am getting a lot of errors - see attached image. Any ideas as to what is wrong? I believe I have followed all the steps and prerequisites but might have missed something. I am able to build MU from the command line though. My OS is Windows 10. I have not changed any source file yet.

Attachment Size
error_c_linkage.png 53.39 KB


In reply to by Jojo-Schmitz

I've made some progress here. I had previously added both "Debug" and "Release with Debug Information" as build configurations (thought it might be nice to have both). RwDI gives me the bunch of errors I showed + many others when I tried to fix them, but I just switched to Debug and it worked without errors. No idea why RwDI is broken.
Thank you Jojo for looking into this. :)

In reply to by Jojo-Schmitz

I read your previous post and started Visual Studio Installer to double check everything and I did have all the right components selected. Also it was saying it would install to C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools which was by default and definitely not something I had selected. I am glad that at least the Debug configuration worked because I was on the verge of giving up and deleting everything. :( Now I have it working and even made my first improvement to MuseScore for myself. :) If I have time and inspiration some day, I might comprare "Debug" and "Release with Debug Info" and see what differences are there - probably the culprit is among them. Thanks again for your time! :)

In reply to by Jojo-Schmitz

cl.exe is essentially the same:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64
I installed the build tools only without Visual Studio.

Btw, have you seen these messages in Qt Creator:
1. "Waiting for the applications to stop"
2. "Could not connect to the in-process qml debugger"
I just dismiss them and everything continues fine but are annoying.

Do you still have an unanswered question? Please log in first to post your question.