I am not sure if this question belongs here or in the Visual Studio forum but I have nowhere else to ask to.
I am new with JUCE. I have just installed it and Visual Studio 2022 in a Windows 11 24H2 64bit system and I am trying to complete my first project a simple minisynth with a very simple one-button GUI. From the very start I get a horrible list of error messages with Visual Studio complaining it is unable to build. This is the full list of errors:
1>------ Build started: Project: MiniSynth_App, Configuration: Debug x64 ------
1>Main.cpp
1>MainComponent.cpp
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(10,31): error C2653: ‘juce’: is not a class or namespace name
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(10,37): error C2504: ‘Component’: base class undefined
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(10,31): error C2653: ‘juce’: is not a class or namespace name
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(18,17): error C2653: ‘juce’: is not a class or namespace name
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(10,37): error C2504: ‘Component’: base class undefined
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(18,23): error C2061: syntax error: identifier ‘Graphics’
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(27,1): error C2143: syntax error: missing ‘;’ before ‘}’
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(18,17): error C2653: ‘juce’: is not a class or namespace name
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(26,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(18,23): error C2061: syntax error: identifier ‘Graphics’
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(26,5): warning C4183: ‘JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR’: missing return type; assumed to be a member function returning ‘int’
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(27,1): error C2143: syntax error: missing ‘;’ before ‘}’
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(15,6): error C3668: ‘MainComponent::~MainComponent’: method with override specifier ‘override’ did not override any base class methods
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(26,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(18,10): error C3668: ‘MainComponent::paint’: method with override specifier ‘override’ did not override any base class methods
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(19,10): error C3668: ‘MainComponent::resized’: method with override specifier ‘override’ did not override any base class methods
1>(compiling source file ‘../../Source/Main.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(26,5): warning C4183: ‘JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR’: missing return type; assumed to be a member function returning ‘int’
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(15,6): error C3668: ‘MainComponent::~MainComponent’: method with override specifier ‘override’ did not override any base class methods
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(13,38): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(18,10): error C3668: ‘MainComponent::paint’: method with override specifier ‘override’ did not override any base class methods
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(13,44): error C2504: ‘JUCEApplication’: base class undefined
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.h(19,10): error C3668: ‘MainComponent::resized’: method with override specifier ‘override’ did not override any base class methods
1>(compiling source file ‘../../Source/MainComponent.cpp’)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(19,11): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(19,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(6,5): error C3861: ‘setSize’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(19,24): error C3646: ‘getApplicationName’: unknown override specifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(19,43): error C2059: syntax error: ‘)’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(19,60): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(14,28): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(20,11): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(14,34): error C2065: ‘Graphics’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(20,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(14,44): error C2065: ‘g’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(20,24): error C3646: ‘getApplicationVersion’: unknown override specifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(14,21): error C2761: ‘void MainComponent::paint(void)’: redeclaration of member is not allowed
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(20,46): error C2059: syntax error: ‘)’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(15,1): error C2143: syntax error: missing ‘;’ before ‘{’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(20,60): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,5): error C3927: ‘->’: trailing return type is not allowed after a non-function declarator
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,6): error C3484: syntax error: expected ‘->’ before the return type
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(24,28): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(24,22): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,7): error C3613: missing return type after ‘->’ (‘int’ assumed)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(24,40): error C2143: syntax error: missing ‘,’ before ‘&’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,7): error C2146: syntax error: missing ‘;’ before identifier ‘fillAll’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(46,40): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,45): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(46,34): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,5): error C3927: ‘->’: trailing return type is not allowed after a non-function declarator
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(46,52): error C2143: syntax error: missing ‘,’ before ‘&’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,6): error C3484: syntax error: expected ‘->’ before the return type
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(58,34): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,7): error C3613: missing return type after ‘->’ (‘int’ assumed)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(58,40): error C2504: ‘DocumentWindow’: base class undefined
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(61,21): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,5): error C2086: ‘int g’: redefinition
1> D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,5):
1> see declaration of ‘g’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(61,27): error C2061: syntax error: identifier ‘String’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(97,5): error C2143: syntax error: missing ‘;’ before ‘}’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,7): error C2146: syntax error: missing ‘;’ before identifier ‘setFont’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(96,9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(19,16): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(96,9): warning C4183: ‘JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR’: missing return type; assumed to be a member function returning ‘int’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,5): error C3927: ‘->’: trailing return type is not allowed after a non-function declarator
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(80,14): error C3668: ‘MiniSynthApplication::MainWindow::closeButtonPressed’: method with override specifier ‘override’ did not override any base class methods
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,6): error C3484: syntax error: expected ‘->’ before the return type
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,7): error C3613: missing return type after ‘->’ (‘int’ assumed)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(100,10): error C2039: ‘unique_ptr’: is not a member of ‘std’
1> D:\Development\JUCE_Projects\MiniSynth\Builds\VisualStudio2022\predefined C++ types (compiler internal)(357,11):
1> see declaration of ‘std’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(100,20): error C2143: syntax error: missing ‘;’ before ‘<’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(100,10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,5): error C2086: ‘int g’: redefinition
1> D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,5):
1> see declaration of ‘g’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(100,43): error C2238: unexpected token(s) preceding ‘;’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(21,10): error C3668: ‘MiniSynthApplication::moreThanOneInstanceAllowed’: method with override specifier ‘override’ did not override any base class methods
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(24,10): error C3668: ‘MiniSynthApplication::initialise’: method with override specifier ‘override’ did not override any base class methods
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,7): error C2146: syntax error: missing ‘;’ before identifier ‘setColour’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(20,18): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(31,10): error C3668: ‘MiniSynthApplication::shutdown’: method with override specifier ‘override’ did not override any base class methods
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,5): error C3927: ‘->’: trailing return type is not allowed after a non-function declarator
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(39,10): error C3668: ‘MiniSynthApplication::systemRequestedQuit’: method with override specifier ‘override’ did not override any base class methods
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,6): error C3484: syntax error: expected ‘->’ before the return type
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(46,10): error C3668: ‘MiniSynthApplication::anotherInstanceStarted’: method with override specifier ‘override’ did not override any base class methods
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,7): error C3613: missing return type after ‘->’ (‘int’ assumed)
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(28,9): error C2065: ‘mainWindow’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,5): error C2086: ‘int g’: redefinition
1> D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(17,5):
1> see declaration of ‘g’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(28,43): error C3861: ‘getApplicationName’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,7): error C2146: syntax error: missing ‘;’ before identifier ‘drawText’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(35,9): error C2065: ‘mainWindow’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(21,51): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(22,1): error C2059: syntax error: ‘}’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(43,9): error C3861: ‘quit’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(22,1): error C2143: syntax error: missing ‘;’ before ‘}’
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(62,31): error C2065: ‘name’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(63,31): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(25,1): error C2143: syntax error: missing ‘;’ before ‘{’
1>D:\Development\JUCE_Projects\MiniSynth\Source\MainComponent.cpp(25,1): error C2447: ‘{’: missing function header (old-style formal list?)
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(63,46): error C3861: ‘getInstance’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(64,72): error C2653: ‘juce’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(64,95): error C2065: ‘backgroundColourId’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(65,31): error C2653: ‘DocumentWindow’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(65,47): error C2065: ‘allButtons’: undeclared identifier
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(62,15): error C2614: ‘MiniSynthApplication::MainWindow’: illegal member initialization: ‘DocumentWindow’ is not a base or member
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(67,13): error C3861: ‘setUsingNativeTitleBar’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(68,13): error C3861: ‘setContentOwned’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(73,13): error C3861: ‘setResizable’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(74,29): error C3861: ‘getWidth’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(74,41): error C3861: ‘getHeight’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(74,13): error C3861: ‘centreWithSize’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(77,13): error C3861: ‘setVisible’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(85,13): error C2653: ‘JUCEApplication’: is not a class or namespace name
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(85,30): error C3861: ‘getInstance’: identifier not found
1>D:\Development\JUCE_Projects\MiniSynth\Source\Main.cpp(106,1): error C1004: unexpected end-of-file found
1>Done building project “MiniSynth_App.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 2:52 μμ and took 03,185 seconds ==========
This is a huge list and I am at a loss. I am new to this so I am not sure what is going on. I asked Gemini to help me. It has proposed 5 or 6 different solutions, like changing the SDK version in the Projucer in Exporters, and doing a completely new, fresh installation, but nothing works. Its last suggestion was to install the 2019 version of Visual Studio Community but that is unfortunately not available without an active subscription.
If anyone be patient with a newcomer and give me some help I would appreciate any suggestion. Thank you very much.
