Linking a juce built static lib inside of a juce plugin or app in juce 5x

Basic question:
Is using a juce static lib in a juce plugin\app supported in the latest juce(5.4.3)?

I am still on juce 4.3.1 (2.5 years old!) and am looking at upgrading to 5.4.3.
Currently I link various static libs into multiple plugins and app projects. This works fine in juce 4.3.1.

If I try to build my master VS solution file with juce 5.4.3 I get lots of LNK2005 “already defined” errors.
It seems the difference is how the juce modules are included into the juce projects in Juce 5.
In juce 4.3.1 the modules cpp files are included directly into the vcxproj. Since they are always the exact same source files being used to create the .objs, there’s no conflict between the various libs (at least this is why I think it works).

In 5.4.3 the modules cpps are used as header files, included into project specific cpp files that can have different AppConfig settings with each library/app, so we have conflicts.

Is there a way to use juce static libs in a juce project or should I dispense with static libs and go to a flat model where I include shared cpp files in every app\plugin that I create?


Ok, it was using some old libs since the build location changed to “Debug\Static Library” and I hadn’t noticed that. Now I’m trying to fix these kinds of errors:
Error LNK2005 _Thrd_sleep already defined in libcpmtd.lib(cthread.obj)
which I read should be fixed by changing to runtime dll usage and a project clean, but so far no luck.

Last reply. I had better luck switching everything to static linking. Somehow I couldn’t fix all the errors with runtime dll usage for Windows…