Thanks, wouldn't char parStatus[2048]; hold it on the stack?
std::format I'll look into, stringstream was taught to me very early. I learn bits of the std library from time to time when I get sick of reinventing the wheel with primitives, I never got there with stringstream because it was pretty straight forward.
**EDIT** std::format, just as easy, I just need to use it 50 times and I might remember it.
std::format I'll look into, stringstream was taught to me very early. I learn bits of the std library from time to time when I get sick of reinventing the wheel with primitives, I never got there with stringstream because it was pretty straight forward.
**EDIT** std::format, just as easy, I just need to use it 50 times and I might remember it.
Posted Wed 13 Dec 23 @ 7:03 pm
When using char parStatus[2048]; it just means that it's part of CMyPlugin8 storage.
It then depends on how the memory for CMyPlugin8 is created on where that is stored.
If you would create the plugin in a function like:
Then it would indeed be on the stack, and that would indeed be problematic if it's big.
But myPlugin can also be created on the heap, like CMyPlugin8 *myPlugin = new CMyPlugin8() in which case that is no concern.
There's 2 reasons you can know CMyPlugin8 is created like that.
-A plugin object needs to exist for a long time, so unless a new thread is created with its own stack just to hold the stack object alive, it would have to be stored on the heap
-VirtualDJ doesn't even know the specifics of CMyPlugin8, all it knows is that there is a function DllGetClassObject that can be used to create the plugin. And it turns out that that function is completely in your control, and indeed creates the CMyPlugin8 on the heap :)
It then depends on how the memory for CMyPlugin8 is created on where that is stored.
If you would create the plugin in a function like:
void myfunction()
{
CMyPlugin8 myPlugin;
}
Then it would indeed be on the stack, and that would indeed be problematic if it's big.
But myPlugin can also be created on the heap, like CMyPlugin8 *myPlugin = new CMyPlugin8() in which case that is no concern.
There's 2 reasons you can know CMyPlugin8 is created like that.
-A plugin object needs to exist for a long time, so unless a new thread is created with its own stack just to hold the stack object alive, it would have to be stored on the heap
-VirtualDJ doesn't even know the specifics of CMyPlugin8, all it knows is that there is a function DllGetClassObject that can be used to create the plugin. And it turns out that that function is completely in your control, and indeed creates the CMyPlugin8 on the heap :)
Posted Thu 14 Dec 23 @ 6:36 am
Ahh ok, makes sense, all the tutorials I dip in & out of are general stand alone things, I never considered the implications of it being called by another program.
thanks
One final question; How would a mac user bypass the security hand holding employed for unregistered programs?
$100 (or whatever apple charge now) isn't much but I'm still completely against it on principle. [ It's like something out of UBIK, if you know Philip K Dick Sc-Fi ]
thanks
One final question; How would a mac user bypass the security hand holding employed for unregistered programs?
$100 (or whatever apple charge now) isn't much but I'm still completely against it on principle. [ It's like something out of UBIK, if you know Philip K Dick Sc-Fi ]
Posted Thu 14 Dec 23 @ 7:05 am
I don't think there's a way to really disable the mac security, so if you want to create programs/plugins for other people you most likely will need to join the apple developer program yes.
Posted Thu 14 Dec 23 @ 7:19 am
I'm glad to hear that the potential stack overflow issue isn't a concern with the way CMyPlugin8 is created on the heap.
Posted Tue 06 Feb 24 @ 1:45 pm
How do I load this on my Mac (Silicon). So I have cloned (https://github.com/szemek/virtualdj-plugins-examples ) and loaded the basic-plugin-with-default-interface into XCode. Built the .bundle file. Now when I created the plugins folder on my laptop, I found one at /Users/Username/Library/Application\ Support/VirtualDJ/PluginsMacArm. Should I just drop the .bundle directly inside this? Or should I put it in a specific sub-folder? I tried several things but it simply does not show my plugin when I open VirtualDJ and search for MyPlugin8 inside the VirtualDJ Extensions tab. How do I get this plugin activated and working?
Posted Tue 25 Jun 24 @ 9:56 am
user29149771 wrote :
How do I get this plugin activated and working?
https://www.virtualdj.com/wiki/Developers.html
The plugin must be copied in the following folders:
[PC] .\Documents\VirtualDJ\Plugins\{Sub-Folder} for VirtualDJ - 32bit (dll in 32bit)
[PC] .\Documents\VirtualDJ\Plugins64\{Sub-Folder} for VirtualDJ - 64bit (dll in 64bit)
[Mac] ./Documents/VirtualDJ/Plugins64/{Sub-Folder} for VirtualDJ - 64bit (bundle in 64bit)
[Mac Arm/Apple Silicon] ./Documents/VirtualDJ/PluginsArm/{Sub-Folder} for VirtualDJ - ARM 64bit (bundle in 64bit)
For available examples:
basic & audio plugins go to SoundEffect
video fx plugin goes to VideoEffect
video transition goes to VideoTransition
online source plugin goes to OnlineSources
Posted Tue 25 Jun 24 @ 5:41 pm
szemek wrote :
https://www.virtualdj.com/wiki/Developers.html
The plugin must be copied in the following folders:
[PC] .\Documents\VirtualDJ\Plugins\{Sub-Folder} for VirtualDJ - 32bit (dll in 32bit)
[PC] .\Documents\VirtualDJ\Plugins64\{Sub-Folder} for VirtualDJ - 64bit (dll in 64bit)
[Mac] ./Documents/VirtualDJ/Plugins64/{Sub-Folder} for VirtualDJ - 64bit (bundle in 64bit)
[Mac Arm/Apple Silicon] ./Documents/VirtualDJ/PluginsArm/{Sub-Folder} for VirtualDJ - ARM 64bit (bundle in 64bit)
For available examples:
basic & audio plugins go to SoundEffect
video fx plugin goes to VideoEffect
video transition goes to VideoTransition
online source plugin goes to OnlineSources
user29149771 wrote :
How do I get this plugin activated and working?
https://www.virtualdj.com/wiki/Developers.html
The plugin must be copied in the following folders:
[PC] .\Documents\VirtualDJ\Plugins\{Sub-Folder} for VirtualDJ - 32bit (dll in 32bit)
[PC] .\Documents\VirtualDJ\Plugins64\{Sub-Folder} for VirtualDJ - 64bit (dll in 64bit)
[Mac] ./Documents/VirtualDJ/Plugins64/{Sub-Folder} for VirtualDJ - 64bit (bundle in 64bit)
[Mac Arm/Apple Silicon] ./Documents/VirtualDJ/PluginsArm/{Sub-Folder} for VirtualDJ - ARM 64bit (bundle in 64bit)
For available examples:
basic & audio plugins go to SoundEffect
video fx plugin goes to VideoEffect
video transition goes to VideoTransition
online source plugin goes to OnlineSources
Hi Szemek, hi everybody,
Thank you for sharing that GitHub repo of examples but I’m still running into some issues:
I’m using a MacMini with the M4 chip and VirtualDJ 8 Pro.
I cloned and built the basic-plugin-with-default-interface project from your repo (https://github.com/szemek/virtualdj-plugins-examples/tree/master ).
I copied the resulting .bundle into both VirtualDJ/PluginsMacArm/AutoStart and VirtualDJ/PluginsMacArm/Other (not sure which is correct).
When I launch VirtualDJ, the plugin doesn’t show up under Extensions.
But opening the "Apple Console", I see this error about VirtualDJ trying to load the plugin: dlsym cannot find symbol _DllGetClassObject@12 in CFBundle 0x600000a40ee0 </Users/bodde/Documents/VirtualDJ/PluginsMacArm/AutoStart/MyPlugin8.bundle>.
Can someone help me with that ? does anyone know how to resolve it ?
Thanks, bodde
Posted Tue 19 Aug 25 @ 4:20 pm
Have you selected "arm" and not "intel" in XCode ?
Have you well included both .cpp files in compilation section?
Have you well included both .cpp files in compilation section?
Posted Tue 19 Aug 25 @ 6:04 pm
djcel wrote :
Have you selected "arm" and not "intel" in XCode ?
Have you well included both .cpp files in compilation section?
Have you well included both .cpp files in compilation section?
Hi DJCEL,
I'm not very experienced with Xcode, I hope that these are the build settings you asked me about:


And these are the steps I did in order to load the plugin into VDJ
Build report:

Bundle location:

Copied into:

Opening VDJ and looking in vain for the plugin (is it correct Other/Custom Mappers ?):

Looking for logs into Apple Console:

Thank you for supporting me!
bodde
Posted Wed 20 Aug 25 @ 8:07 am
"Extensions" are only the plugins uploaded on the VirtualDJ website so it's normal not to see it there.
Check on the skin, in the fx list if you see it.
Check on the skin, in the fx list if you see it.
Posted Wed 20 Aug 25 @ 7:13 pm
djcel wrote :
"Extensions" are only the plugins uploaded on the VirtualDJ website so it's normal not to see it there.
Check on the skin, in the fx list if you see it.
Check on the skin, in the fx list if you see it.
I checked all the skins and effects sections but I didn't find any installed plugin related to MyPlugin8. I clearly missing something and the error "dlsym cannot find symbol _DllGetClassObject@12 in CFBundle 0x600000a40ee0" seems critical to me. Has anyone successfully managed to compile, install and run the 'basic-plugin-with-default-interface' plugin or any other generic plugin? If so, could you please share the detailed steps?
Posted 5 days ago @ 8:39 am
I also had "_DllGetClassObject@12" in the past on 32bit dll (Windows) when there was a conflict between DllGetClassObject from the Windows API and the one exported in the VirtualDJ SDK
The export function has to be "DllGetClassObject"
I guess it's the same issue but I can't reproduce it here
The export function has to be "DllGetClassObject"
Quote :
Warning 1 wrote :
warning LNK4104: export of symbol 'DllGetClassObject' should be PRIVATE
can be removed by adding the following code in the additional option of the Linker
/IGNORE:4104
Warning 1 wrote :
warning LNK4104: export of symbol 'DllGetClassObject' should be PRIVATE
can be removed by adding the following code in the additional option of the Linker
/IGNORE:4104
I guess it's the same issue but I can't reproduce it here
Posted 5 days ago @ 12:12 pm
Can you check that CoreFoundation.framework is well added to the project.
In the past we used Carbon.framework but it is not the case anymore
I can't see these lines in the XCode projet:
In the past we used Carbon.framework but it is not the case anymore
I can't see these lines in the XCode projet:
Quote :
01AB35B42438B6D90007DD4D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01AB35B32438B6D90007DD4D /* CoreFoundation.framework */; };
Quote :
01AB35B32438B6D90007DD4D /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<group>"; };
Quote :
/* Begin PBXFrameworksBuildPhase section */
01E00BCD24387F8300FCA8C5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
01AB35B42438B6D90007DD4D /* CoreFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
01E00BCD24387F8300FCA8C5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
01AB35B42438B6D90007DD4D /* CoreFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
Quote :
01CE6D06243886560008A505 /* External Frameworks */ = {
isa = PBXGroup;
children = (
01AB35B32438B6D90007DD4D /* CoreFoundation.framework */,
);
name = "External Frameworks";
sourceTree = "<group>";
};
isa = PBXGroup;
children = (
01AB35B32438B6D90007DD4D /* CoreFoundation.framework */,
);
name = "External Frameworks";
sourceTree = "<group>";
};
Posted 5 days ago @ 12:24 pm
Maybe by adding this line too
Or
#pragma comment( linker, "/EXPORT:DllGetClassObject" )
Or
#pragma comment( linker, "/EXPORT:DllGetClassObject, PRIVATE" )
Posted 3 days ago @ 7:04 am