Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. Signal of dll, multiple definition of `Class::Method()'
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Chinese
1 Posts 1 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jonix
    wrote on last edited by
    #1

    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也会自动生成一个同名方法。
    那么程序在链接时,出现了重复定义的错误。

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved