micknoise / Maximilian

C++ Audio and Music DSP Library

Home Page:http://www.maximilian.strangeloop.co.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I had to add some preprocessor definitions to compile under Windows

oparisy opened this issue · comments

Hi, I had to add the following definitions at the end of maximilianExamples.cmake to be able to compile 1.TestTone with cmake on the Windows command line:

if (WIN32)
  add_definitions(-D_HAS_STD_BYTE=0)
  add_definitions(-D__WINDOWS_WASAPI__)
endif()

The first definition will work around this issue, and the second one is required to get sound (otherwise this warning is printed: "RtApiDummy: This class provides no functionality.").

Could those definitions be added to Maximilian? Should I issue a PR?

Compilation environment details:

-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.35.32217.1
-- The CXX compiler identification is MSVC 19.35.32217.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - 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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Olivier/Dev/Maximilian/cpp/commandline/maximilian_examples/1.TestTone/build

Regards,
Olivier.