• 1540阅读
  • 1回复

[提问]链接 dll 的问题【已解决】 [复制链接]

上一主题 下一主题
离线lanmanck
 

只看楼主 倒序阅读 楼主  发表于: 2020-10-09
搞了一天搞不定 带界面的dll和exe调用,dll是有了,但是exe 老是提示


moc_mainwindow.obj:-1: error: LNK2001: 无法解析的外部符号 "public: static struct QMetaObject const DllTest::staticMetaObject" (?staticMetaObject@DllTest@@2UQMetaObject@@B)

参考: https://blog.csdn.net/panchang199266/article/details/104733877


window.open('http://www.qtcn.org/bbs/attachment/Mon_2010/17_48171_d21eac726356bf3.png?46');" style="max-width:700px;max-height:700px;" onload="if(is_ie6&&this.offsetWidth>700)this.width=700;" >

工程和测试工程一起上传:
DllTest.rar (1441 K) 下载次数:5

精彩博客:labisart.com
离线lanmanck

只看该作者 1楼 发表于: 2020-10-09
搞定了,是要 加入
#if defined(DLLTEST_LIBRARY)
#  define DLLTEST_EXPORT Q_DECL_EXPORT
#else
#  define DLLTEST_EXPORT Q_DECL_IMPORT
#endif
精彩博客:labisart.com
快速回复
限100 字节
 
上一个 下一个