-----Original Message-----
From: Kyle Edwards <[email protected]> 
Sent: 13 September 2019 16:54
To: Stephen Morris <[email protected]>; [email protected]
Subject: Re: [CMake] Preventing multiple definitions of metaObject methods

>Stephen,
>Could you post a minimally reproducible example with CMakeLists.txt and 
>accompanying source code? I am currently working on a Qt-based >project with 
>static libraries and have not encountered this issue.
>Kyle

Thank you Kyle. I created a basic example as you suggested - a simple 
application linking a simple static library, both incorporating a header 
containing Q_OBJECT - and to my great chagrin it worked perfectly, without any 
compilation errors. 

So it seems that I've been wrong to suspect this as the cause of the 
multiple-definition errors in my main project. Clearly I must dig deeper, and 
if I find that the final explanation is of general interest then I shall report 
back.

Stephen.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to