Linking to exter C lib causes plugin to not load


I am using visual studio to build my VST.

If I have a console app and link to an external C library, I can call the interface to the library and everything works.

If I include the C lib in my Juce app, and make any calls to the lib eg. An Inititalistion method, then the plugin will not even load in Wavelab or AudioMulch.

Calliong the lib functions from a juce app causes the plugin to not even load, so obviosuly there is some problem with calling the C lib from the Juce app, but it works in a normal console applicatin.

I had to link statically, so in the console app turned @Randomized Base Address@ to No (/DYNAMICBASE:NO)
I tried the same with the Juce VST app but that didnt help.

I would have thought maybe the symbols were not loaded correctly and it was not able to find the entry points into the lib correctly, but it works in the console app...

Any ideas?


Do the plugins fail to load with the demo host that ships with JUCE? If so then it might be best to debug it through the demo host project and see what's going on. I had a problem with Live not loading one of my plugins that calls pthread.dll. In the end I had to static build the plugin which seemed to solve the problem. Note it was only an issue with Live. All other hosts loaded it fine. What lib are you using?