JUCE
JUCE copied to clipboard
[Bug]: DLL Complie Error in MSVC
Detailed steps on how to reproduce the bug
“In a Windows DLL build, we’ll expose some malloc/free functions that live inside the DLL, and use these for allocating all the objects - that way all juce objects in the DLL and in the host will live in the same heap, avoiding problems when an object is created in one module and passed across to another where it is deleted. By piggy-backing on the JUCE_LEAK_DETECTOR macro, these allocators can be injected into most juce classes.” in line 167 of juce_Memory.h. But when I complie use the “JUCE_DLL_BUILD” macro in MSVC, that will cause the C2385 error. I found when I use the JUCE_LEAK_DETECTOR macro,operator new and operator delete in derived and all of base classes were overloaded.Then it caused C2385 error.
What is the expected behaviour?
1>D:\develop\JUCE\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp(152,2): error C2385: 对“delete”的访问不明确 1>D:\develop\JUCE\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp(152,2): message : 可以是基 "juce::Component" 中的 "delete" 1>D:\develop\JUCE\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp(152,2): message : 也可以是基 "juce::ParameterListener" 中的 "delete" 1>D:\develop\JUCE\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp(105,1): message : 此诊断出现在编译器生成的函数“void *juce::ParameterComponent::__delDtor(unsigned int)”中 1>D:\develop\JUCE\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.cpp(104,2): message : 参见对函数 "void *juce::ParameterComponent::__delDtor(unsigned int)" 的引用
Operating systems
Windows
What versions of the operating systems?
10.0.22000.675
Architectures
x86_64, 64-bit, 32-bit
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
I have not tested against the develop branch
Code of Conduct
- [X] I agree to follow the Code of Conduct