I'm running into a link problem on Windows. I only have Windows on CI, so debugging this is... challenging.
- cmake 3.10+ - AUTOMOC is ON for the project in the top level cmake file - Dynamic Library "A": class LIB_IMPORT_EXPORT Foo { Q_OBJECT ... where LIB_IMPORT_EXPORT uses Q_DECL_EXPORT/Q_DECL_IMPORT properly depending on who's building. - Dynamic Library (Plugin) "B": Uses target_link_libraries( B "A" ) to include "A". When compiling with MSVC (on CI), I have a link problem: PLUGIN_B_autogen\4RG5PT7PRG/moc_Foo.cpp(75): warning C4273: 'Foo::qt_static_metacall': inconsistent dll linkage LibraryA\include\Foo.h(30): note: see previous definition of 'qt_static_metacall' PLUGIN_B_autogen\4RG5PT7PRG/moc_Foo.cpp(111): error C2491: 'Foo::staticMetaObject': definition of dllimport static data member not allowed 1) This setup was working before I added a class with Q_OBJECT & signals to "A" 2) It looks like I'm getting Foo's static meta object compiled into both "A" and "B". Is this what should be happening? I feel like I'm missing something obvious... --- Andy Maloney // https://asmaloney.com twitter ~ @asmaloney <https://twitter.com/asmaloney>
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest