rorywalsh/cabbage

Is Visual Studio 2019 required or are NEWER visual studio installs workable for building Cabbage?

Closed this issue · 6 comments

I get this error building from the python build script:

===========================================================
Running CMake for CLIConverter(Release)

CMake Error at CMakeLists.txt:22 (project):
Generator

Visual Studio 16 2019

could not find any instance of Visual Studio.

This is from a powershell Visual STudio shell where the VS c compiler is in the path.

ie if I run "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\Hostx64\x64\cl.exe"
I see:
Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30706 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

I am not sure what the generator name in the script does.

    generator = "Visual Studio 16 2019"

Is that something special that CMake knows about? Can that be changed to make it build later versions? I am not a vastly experienced person with CMake, but I have done lots of work in visual Studio over a lot of years. Just not sure what's up with this.

It would seem the change is

:
    if platform.system() == "Windows":
        generator = "Visual Studio 17 2022"

I could probably figure out a way to have this python script probe for which one of these is installed.

I should update that. In fact, on Windows I think CMake defaults to whatever VS Studio it finds. So we might be able to leave it out entirely. FWIW, you can simply disable the building of this binaries. Just remove the reference to it on this line and it won't be built:

https://github.com/rorywalsh/cabbage/blob/develop/build.py#L108

It's only need if you plan to do batch conversions of lots of instruments. It's a niche feature.

I am able to build the one you suggested commenting out, and it compiles the main cabbage.exe dependencies, but won't create the cabbage.lib library, or link the cabbage.exe. . perhaps an incompatibility with VS 2022 standard runtime libraries or a dependency C++ library/framework.

    Creating library C:/audiodev/csound_stuff/cabbage/build/cabbage_artefacts/Release/VST3/cabbage.lib and object C:/audiodev/csound_stuff/cabbage/build/cabbage_artefacts/Release/VST3/cabbage.exp
cabbage_SharedCode.lib(CabbagePluginEditor.obj) : error LNK2001: unresolved external symbol "public: void
 __cdecl ComponentLayoutEditor::updateFrames(void)" (?updateFrames@ComponentLayoutEditor@@QEAAXXZ) [C:\au
diodev\csound_stuff\cabbage\build\cabbage_VST3.vcxproj]
cabbage_SharedCode.lib(CabbagePluginEditor.obj) : error LNK2001: unresolved external symbol "public: void
 __cdecl ComponentLayoutEditor::setTargetComponent(class juce::Component *)" (?setTargetComponent@Compone
ntLayoutEditor@@QEAAXPEAVComponent@juce@@@Z) [C:\audiodev\csound_stuff\cabbage\build\cabbage_VST3.vcxproj
]
cabbage_SharedCode.lib(CabbagePluginEditor.obj) : error LNK2001: unresolved external symbol "public: virt
ual __cdecl ComponentLayoutEditor::~ComponentLayoutEditor(void)" (??1ComponentLayoutEditor@@UEAA@XZ) [C:\
audiodev\csound_stuff\cabbage\build\cabbage_VST3.vcxproj]
cabbage_SharedCode.lib(CabbagePluginEditor.obj) : error LNK2001: unresolved external symbol "public: __cd
ecl ComponentLayoutEditor::ComponentLayoutEditor(class juce::ValueTree)" (??0ComponentLayoutEditor@@QEAA@
VValueTree@juce@@@Z) [C:\audiodev\csound_stuff\cabbage\build\cabbage_VST3.vcxproj]
C:\audiodev\csound_stuff\cabbage\build\cabbage_artefacts\Release\VST3\cabbage.vst3\Contents\x86_64-win\ca
bbage.vst3 : fatal error LNK1120: 4 unresolved externals [C:\audiodev\csound_stuff\cabbage\build\cabbage_
VST3.vcxproj]
===========================================================
 Copying binaries before removing build folder

I'm wondering if this is hitting a C++ VC2022 bug.

public: __cdecl ComponentLayoutEditor::ComponentLayoutEditor(class juce::ValueTree)....

Source/GUIEditor/ComponentLayoutEditor.cpp
Source/GUIEditor/ComponentLayoutEditor.h

cl.exe reports:

Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31937 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

No compiler stage warnings, and no complaints about missing .obj or .lib.

Attaching entire compile log

python.exe build.py --config Release --project cabbage >build.log

build.zip

link error build log (VC 2022 latest, win10)

OBviously I can use the nightly builds for my purposes, but since I thought I might be able to help by trying stuff it would be nice if this built on my Win pc. Gonna try on my mac and on my linux laptop too so I can see the differences.

Looks like the builds are messed up because your plugin interface build is trying to compile source from the main Cabbage IDE. I suggest you nuke the build dir, comment out the CLI project and try running the build again. You can try this:

python build.py --packageType="Minimal"

Closing due to inactivity.