当前位置:网站首页>qt开发技巧与三个问题点
qt开发技巧与三个问题点
2022-07-21 02:21:00 【yantuguiguziPGJ】
目录
问题一 error: C2143: 语法错误: 缺少“;”(在“*”的前面)
问题二 无法解析的外部符号 "public: virtual struct QMetaObject
问题三 缺少库文件SapClassBasic86.dll、SapClassBasic85.dll和SapClassBasic84.dll
开发技巧
右键 refactor 再rename,一键修改类名。
头文件里不放入第三库的依赖,在cpp文件里放入,并通过私有类的方式,引入第三库的类指针来使用。可以让头文件给别人使用的时候,别人不用依赖第三方库。
依赖的库放到代码外边,插件封装,工厂只有逻辑业务的代码。
工控机注意分区,让C盘扩大。
问题一 error: C2143: 语法错误: 缺少“;”(在“*”的前面)
Qt 报错:error: C2143: 语法错误: 缺少“;”(在“*”的前面)_Qt
这是因为,如有2个头文件a.h和 b.h,A.h有#include “B.h”,而b.h也有#include"A.h",同时B.h头文件中有a类的对象(即有A a)等,这样造成
A.h与B.h之间无限循环引用,即会导致以上的错误。解决方法是在B.h头文件的类前声明一下A类即可(即class A;)。
-----------------------------------
Qt 报错:error: C2143: 语法错误: 缺少“;”(在“*”的前面)
Qt 报错:error: C2143: 语法错误: 缺少“;”(在“*”的前面)_mb5fe559d8b9ae4的技术博客_51CTO博客
问题二 无法解析的外部符号 "public: virtual struct QMetaObject
hcameradalsaline.obj:-1: error: LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __cdecl WorkerThread::metaObject(void)const " ([email protected]@@[email protected]@XZ)
加上下面这句就可以了
#include "debug/hcameradalsaline.moc"
问题三 缺少库文件SapClassBasic86.dll、SapClassBasic85.dll和SapClassBasic84.dll
Sapera_LT_8.30_SDK.exe在两台电脑上安装的结果文件不一致。
这是由于SDK版本未注意,不对应。
一台是:Sapera_LT_8.30_SDK.exe
另一台是:Sapera_LT_8.60_SDK.exe
起初我以为是i7和i9问题,弄错方向了。
电脑一:
电脑二:
缺少库文件SapClassBasic86.dll、SapClassBasic85.dll和SapClassBasic84.dll
边栏推荐
- 银行不是唐僧肉 银行是金融安全的坚实屏障。
- MySQL character set and collation
- 数字孪生技术海上风电场解决方案
- Kwai wants to grab the shell cake. Is online selling a good business?
- Ctfshow getting started with the web (phpcve)
- Orepa: Ali proposed a heavy parameter strategy with fast training. The memory is halved and the speed is doubled | CVPR 2022
- SOHO @ L2TP/IPsec Issue
- C language practice topic + answer: 21-25
- 与时俱进的不止是产品 从卡罗拉锐放看一汽丰田“二次创业”的信心
- Kubernetes技术与架构(五)
猜你喜欢
读秀数据库的用法+全国图书馆参考咨询联盟
从新零售到社区团购,这中间发生了多少变化?
table自动分页
Solve the problem that the time field is blank when kettle8.2 version table input excel output
零基础学习CANoe Panel(1)—— 新建 Panel
c语言入门---操作符
c语言---24 三子棋
Involution: Inverting the Inherence of Convolution for Visual Recognition(CVPR2021)
数字孪生社区管理系统,九大应用场景建设
Authing 实践 | 授权管理使企业用户登录更容易
随机推荐
Ctfshow web entry command execution
Vs2017 monitoring window
Kv260 (I) running AI box
Kwai wants to grab the shell cake. Is online selling a good business?
通用分頁(分頁代碼的封裝)
LeetCode:1260. 二维网格迁移【一维展开+拼接】
KV260(一)运行AI Box
Can messages in CAPL: declaration, sending and receiving
Application cases under the digital twin of industry 4.0
Crazy God says es
C语言经典实例:21-30例:插入排序、希尔排序1、快速排序、希尔排序2、递归法、完数、斐波那契数列、公约数和公倍数、判断水仙花数统计单词个数
零基础学习CANoe Panel(1)—— 新建 Panel
After leaving a foreign company, I know what respect and compliance are
无码时代,企业数字化转型该如何发展?
【04】穿越功耗墙,我们该从哪些方面提升“性能”?
In the code free era, how should enterprises' digital transformation develop?
机器学习-单变量线性回归
ESB结合UMC云平台开发说明
ASTM F 814 航空航天设备用固体材料产生烟的比光密度的试验方法
Orepa: Ali proposed a heavy parameter strategy with fast training. The memory is halved and the speed is doubled | CVPR 2022