Qt 6.11 is out! See what's new in the release
blog
‘XX’ violates the C++ One Definition Rule [-Wodr] with Qt Creator 19
-
Hello,
since upgrading to version 19 of Qt Creator, lots of warnings have appeared in my code (in the form of annotations), such as:‘XX’ violates the C++ One Definition Rule [-Wodr]The full message is:
/home/path/to/my/file.h:45: avertissement : ‘XX’ violates the C++ One Definition Rule [-Wodr] /home/path/to/build/Project_autogen/TT4UNRZD7V/../../../../../../Project/file.h:45:8: warning: ‘XX’ violates the C++ One Definition Rule [-Wodr] 45 | void XX(); | ^ /home/path/to/my/file.cpp:391:6: note: ‘XX’ was previously declared here 391 | void Class::XX() | ^I think this is a false positive, but I would like to know if you have encountered this warning in your own code.
-
O odelaune has marked this topic as solved