Qt 5 cmake fails with undefined reference to vtable on hello world with inc & src as subdirs

后端 未结 3 1786
青春惊慌失措
青春惊慌失措 2021-01-04 05:29

Update 2

After messing around a bit (and some editing of the generated Makefiles), it looks like what is happening is that moc is not properly processing Mai

3条回答
  •  有刺的猬
    2021-01-04 06:19

    I had the same problem and found a solution. As Eric Lemanissier commented in an issue on GitHub:

    This error is not related to conan: you need to add your header files in add_executable, otherwise the moc won't parse them

    The header files have to be added to the project using an add_executable or add_library statement. If this is not done, automoc won't parse the files.

提交回复
热议问题