Signal of dll, multiple definition of `Class::Method()'



  • dll => moc.cpp => method() { ... }
    app => moc.cpp => method() { ... }

    => signal of dll, multiple definition of `Class::Method()'

    一个含 signal 的类放在了dll中,
    Qt会在 moc_XXX.cpp 中为 signal 生成一个方法。

    在主程序中引入 .h 使用这个类,Qt也会自动生成一个同名方法。
    那么程序在链接时,出现了重复定义的错误。


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.