I have 3 custom dlls.
1.- dll_A
2.- dll_B it is a plugin with custom widgets that use classes of dll_A
3-. dll_C , use some classes of dll_A

The 3 dll's are built ok, without errors.

Ok, later I have tow approachs to run and build my prog.
I have for A,B,C
Qt Code:
  1. #if defined(###_LIBRARY)
  2. # define 1###SHARED_EXPORT Q_DECL_EXPORT
  3. #else
  4. #if defined(###_DIRECT)
  5. # define 1###SHARED_EXPORT
  6. #else
  7. # define 1###SHARED_EXPORT Q_DECL_IMPORT
  8. #endif
  9. #endif
To copy to clipboard, switch view to plain text mode 

Depending If I'm working with Library approach or direct way I define
DEFINE += ###_LIBRARY or DEFINE += ###_DIRECT ( in this case I use all the files as is they were loaded into my project)

All worked fine until I want to use the DLL_C. I have a lot of errors
'Multiple definition...' First defined here' ....

My program use classes of DLL_A and DLL_B, which use itself classes of DLL_A.

If I use the LIBRARY approach I have 5 errors against 395 errors if I use DIRECT approach. In any case, I have this 'multiple definition'... what can I do to solve it ?
Thanks