"Templates cannot have 'C' linkage" build error in Qt Creator
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 |
Comments
Is that a 32-bit Windows?
In reply to Is that a 32-bit Windows? by Jojo-Schmitz
64-bit.
In reply to 64-bit. by krasko78
I don't have any of these files and directories on my PC, Windows 11, also Visual Studio 2022
In reply to I don't have any of these… 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 I've made some progress here… by krasko78
Both work for me. And as mentioned I don't have the file and directory structure from your image at all
In reply to Both work for me. And as… 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 I read your previous post… by krasko78
What compiler does it use?
Here it is "Using Compiler MSVC 19.38.33134.0"
And C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe
In reply to What compiler does it use?… 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.
In reply to cl.exe is essentially the… by krasko78
Well, it is 64-bit (Program File) vs. 32-bit (Program Files (x86))
Hmm, maybe not, Hostx64\x64 in both cases