Library linking in a plugin

I have a library that I would like to use with my newest plugin, but I’m running into some serious build confusion. The library itself can be built as a dll or static library, and I’m feeling quite lost in the problems I’m running into with both.

If I build with the dll version, add the library to the “external libraries to link” section, and add the library path to the search path, the build succeeds, but no hosts can recognize the resulting dll as a vst. Is this perhaps because the plugin cannot locate it’s additional libraries? How is this normally handled?

If I link the static version instead I end up with symbol collision at DLLMain and the vst will not build.

I know I must be doing something silly, but am feeling out of my depth. Has anyone tried to do something similar and succeeded?

My personal recommendation is to always use static libraries if you can. If you can’t get rid of the DLLMain (by removing it and calling the init-code yourself) and you cannot just include the source files into your project, I guess you’re stuck with a .dll.

In this case try to copy the DLL to the same directory where your plugin dll is located (so that your plugins dll can find it) - and don’t forget to include the dll in your installer.

Hope this helps,