Thanks,
I'll look into those. I assumed that PREVIEWRENDER would be for viewport rendering, but after some tests it appears it is not. I'll try to check if it is set when rendering via RenderDocument()!
/Filip
Thanks,
I'll look into those. I assumed that PREVIEWRENDER would be for viewport rendering, but after some tests it appears it is not. I'll try to check if it is set when rendering via RenderDocument()!
/Filip
Thanks,
I will check this again. I am marking this as solved for now.
/Filip
Actually, this does not seem to solve my problem. The option gets added under
"Configuration Properties-> Linker ->All Options->Additional Options"
just as you said, but I would need to modify
"Configuration Properties-> Linker ->All Options->Delay Loaded DLLs".
Is this possible from the project tool? This is for a public open source software, so I would really like to make the build process as streamlined as possible to aid external developers. Therefore, I would like to avoid manually changing the projects generated by the projecttool.
Thanks
/Filip
Thanks, I'll try that!
Regarding the "Ask as a question", have you considered making this the deafult when creating new threads? I would assume most new threads are indeed questions, and it's easy to forget checking this option.
Thanks
/Filip
Hi!
With the project tool, is it possible to specify visual studio-specific options beyond the options outlined here in the docs: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_projecttool.html#page_maxonapi_projecttool_definition_win ?
Specifically, I would like to set the /DELAYLOAD linker option in my project from the projecttool. Is this possible?
Thanks
/Filip
@r_gigante said in Specify additional directories for DLL dependencies:
If I end up with some workaround I'll come back here but for the time being I consider it solved.
OK, thanks for the info!
/Filip
Hi!
My plugin depends on a 3rd party external library in the form of a DLL. According to the docs, additional DLLs needed by a plugin can be placed in myplugin\res\libs\win64. (https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_dev_windows.html#page_maxonapi_dev_windows_practice_dll).
For my plugin, this is not a very convenient solution. The DLL in question is already installed in a specific location, which is added to the PATH environment variable by the installer of the 3rd party library. Also, my plugin project actually consists of several c4d plugins which each need to communicate with the same copy of the DLL. My workaround solution for now is to simply place the DLL in the same directory as the c4d executable. This works, but is not very elegant.
So: Is there any way to specify a custom directory where my plugins will look for additional dynamic libraries? This was possible in previous versions of c4d (using the standard PATH environment variable) so I am really hoping it is possible in R20 as well.
Thanks
/Filip
This has deviated a bit from the original question, so I will mark this as solved and open a new thread with the remaining questions.
Thanks for the input everybody!
I have identified the issue: My plugin could not find/load the dll containing the implementation of the external library. If I place a copy of this dll in <myplugin>\res\libs\win64 then my plugin loads correctly in c4d and is able to call the 3rd party external library.
I found the information about where to place external libs here: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_plugin_dev.html#page_maxonapi_plugin_dev_dependencies_dependencies
In the case of my plugin, however, this solution is not quite satisfactory. It is a large project consisting of several c4d plugins, each dependent on the 3rd party external library. With this solution, I would have to place a copy of the dll in each plugin folder- The dll is quite large (it's a renderer!) so this would bloat my plugin significantly.
Is there any way of telling a c4d plugin to look for dll:s in a specificed directory? (And, as a secondary question: Previously, it was enough to add the dll directory to the PATH environment variable. Is there a good reason why this behaviour was changed?)
/Filip
OK; I seem to have pinpointed the problem to the use of an external library. I created a minimal example plugin that recreates the problem. Including the header file for the external library does not cause any problem, but as soon as I actually create an instance of a class defined in this header in my code, my plugin will stop loading (although everything compiles just fine).
The external library is essential to my plugin, so I can't work around this. In previous versions of c4d (pre-R20) I have used this external library a lot without problems.
Is there anything special I should look out for here? Is it possible,for example, that the source processor does anything to the headers of the external library when I include them? (My understanding of the role of the source processor is still a little shallow).
Thanks
/Filip