juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.

Home Page:https://juce.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: VST3 plugin client incompatible with WIN32_LEAN_AND_MEAN

danra opened this issue · comments

Detailed steps on how to reproduce the bug

I encountered this while trying to workaround #1298 .

juce_audio_plugin_client_VST3.cpp is incompatible with defining WIN32_LEAN_AND_MEAN. With JUCE_VST3_CAN_REPLACE_VST2 enabled, it uses the htonl macro which is not defined in this case. I guess an explicit include for winsock.h is missing.

Steps to reproduce:

  1. Open the AudioPluginDemo example
  2. Enable JUCE_VST3_CAN_REPLACE_VST2 under the juce_audio_plugin_client module in Projucer
  3. Add WIN32_LEAN_AND_MEAN under "Extra Preprocessor Definitions" for the Visual Studio 2022 exporter
  4. Save the project and build in VS2022, get compilation errors on htonl not defined in juce_audio_plugin_client_VST3.cpp

What is the expected behaviour?

Build

Operating systems

Windows

What versions of the operating systems?

Probably all. Tested on Windows 10

Architectures

x86_64

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct