steinbergmedia / vstgui

A user interface toolkit mainly for audio plug-ins
Other
880 stars 124 forks source link

Mac Fails to compile generated project #326

Closed justyntemme closed 5 months ago

justyntemme commented 1 year ago

Error when compiling No member named 'move' in namespace 'std'; did you mean 'modf'? error on line 351 w of 'vstguibase'

==================================================

 Steinberg Media Technologies GmbH
 VST3 Project Generator

==================================================

-- Found Git: /usr/bin/git (found version "2.39.2 (Apple Git-143)") 
-- SMTG_CMAKE_SCRIPT_DIR           : /private/var/folders/79/17bmx5sj3q35gqhp8vvpgys80000gn/T/AppTranslocation/BD7C7795-B338-4358-A6E1-A8BB2BED72D3/d/VST3_Project_Generator.app/Contents/Resources
-- SMTG_ENABLE_VSTGUI_SUPPORT      : ON
-- SMTG_GENERATOR_OUTPUT_DIRECTORY : /Users/justyntemme/Documents/code
-- SMTG_TEMPLATE_FILES_PATH        : /private/var/folders/79/17bmx5sj3q35gqhp8vvpgys80000gn/T/AppTranslocation/BD7C7795-B338-4358-A6E1-A8BB2BED72D3/d/VST3_Project_Generator.app/Contents/Resources/cmake/templates
-- SMTG_VST3_SDK_SOURCE_DIR        : /Users/justyntemme/Documents/code/include/VST_SDK/vst3sdk

-- SMTG_VENDOR_NAME            : 
-- SMTG_VENDOR_HOMEPAGE        : 
-- SMTG_VENDOR_EMAIL           : 
-- SMTG_SOURCE_COPYRIGHT_HEADER: Copyright(c) 2023 .
-- SMTG_PLUGIN_NAME            : LearnVST3
-- SMTG_PREFIX_FOR_FILENAMES   : e.g. controller.h
-- SMTG_PLUGIN_IDENTIFIER      : com.nextwave.learnvst3, used e.g. in Info.plist
-- SMTG_PLUGIN_BUNDLE_NAME     : LearnVST3

-- SMTG_CMAKE_PROJECT_NAME     : e.g. LearnVST3 will output LearnVST3.vst3
-- SMTG_VENDOR_NAMESPACE       : e.g. namespace MyCompanyName {...}
-- SMTG_PLUGIN_CLASS_NAME      : e.g. class LearnVST3Processor : public AudioEffect {...}
-- SMTG_PLUGIN_CATEGORY        : Fx
-- SMTG_MACOS_DEPLOYMENT_TARGET: 13.2

-- SMTG_Processor_UUID         : 0xB7825DE7, 0xCD1655E8, 0x9D2FB99E, 0x93104E36
-- SMTG_Controller_UUID        : 0x76FA707A, 0x68F65923, 0x8FCAD1B2, 0x29365D03

-- Configured: /Users/justyntemme/Documents/code/LearnVST3/CMakeLists.txt
-- Copied    : /Users/justyntemme/Documents/code/LearnVST3/resource/B7825DE7CD1655E89D2FB99E93104E36_snapshot.png
-- Copied    : /Users/justyntemme/Documents/code/LearnVST3/resource/B7825DE7CD1655E89D2FB99E93104E36_snapshot_2.0x.png
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/resource/editor.uidesc
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/resource/win32resource.rc
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/version.h
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/cids.h
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/controller.cpp
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/controller.h
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/entry.cpp
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/processor.cpp
-- Configured: /Users/justyntemme/Documents/code/LearnVST3/source/processor.h

/opt/homebrew/Cellar/cmake/3.26.3/bin/cmake -G Xcode -S /Users/justyntemme/Documents/code/LearnVST3 -B /Users/justyntemme/Documents/code/LearnVST3/build -DSMTG_ADD_VSTGUI=ON 
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [SMTG] macOS Deployment Target: 13.2
-- [SMTG] Check C++ compiler
-- [SMTG] Building with Xcode version: 14.3
-- [SMTG] CMAKE_SOURCE_DIR is set to: /Users/justyntemme/Documents/code/LearnVST3
-- [SMTG] CMAKE_CURRENT_LIST_DIR is set to: /Users/justyntemme/Documents/code/include/VST_SDK/vst3sdk
-- [SMTG] Disable all VST 3 samples
-- [SMTG] SMTG_VSTGUI_SOURCE_DIR is set to: /Users/justyntemme/Documents/code/include/VST_SDK/vst3sdk/vstgui4
-- Found EXPAT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libexpat.tbd (found version "2.5.0") 
-- VSTGUI will use the Expat library at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libexpat.tbd
-- VSTGUI will use the Expat header found in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include
-- [SMTG] SMTG_COREAUDIO_SDK_PATH is not set. If you need it, please download the COREAUDIO SDK!
-- [SMTG] SMTG_AAX_SDK_PATH is not set. If you need it, please download the AAX SDK!
-- Could NOT find LIBJACK (missing: LIBJACK_LIBRARY LIBJACK_INCLUDE_DIR) 
-- [SMTG] LIBJACK_FOUND is not set. If you need it, please install Jack Audio from http://www.jackaudio.org!
-- Performing Test SMTG_USE_STDATOMIC_H
-- Performing Test SMTG_USE_STDATOMIC_H - Success
-- [SMTG] Codesign validator for local machine only
-- [SMTG] Codesign moduleinfotool for local machine only
-- [SMTG] Codesign LearnVST3 for local machine only
-- [SMTG] Setup running moduleinfotool for LearnVST3
-- [SMTG] Setup running validator for LearnVST3
-- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/justyntemme/Library/Audio/Plug-Ins/VST3
-- Configuring done (7.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/justyntemme/Documents/code/LearnVST3/build
gordolio commented 1 year ago

I was able to get it to build by adding the following line to vstgui4/vstgui/lib/vstguibase.h

diff --git a/vstgui/lib/vstguibase.h b/vstgui/lib/vstguibase.h
index bdc58412..8183b945 100644
--- a/vstgui/lib/vstguibase.h
+++ b/vstgui/lib/vstguibase.h
@@ -25,6 +25,7 @@
        #include <stdint.h>
        #include <AvailabilityMacros.h>
        #include <TargetConditionals.h>
+    #include <utility>
        #if TARGET_OS_IPHONE
                #ifndef MAC
                        #define MAC 1