随笔分类 -  问题

g++链接报错:undefined reference to typeinfo of xxx
摘要:g++链接报错:undefined reference to typeinfo of xxx 问题背景 在项目中遇到了这样一个问题:C++文件编译都OK,但链接的时候报错:undefined reference to typeinfo for xxx。 std::typeinfo 是C++中的RTT
169
0
0
报错:Qt 打开项目找不到Qt自己的头文件
摘要:报错:Qt 打开项目找不到Qt自己的头文件 问题描述 打开一个之前能跑的Qt项目,发现编译报错,很多 Qt 自己的宏、头文件、基本类都找不到了。 问题解决 首先排除一下是不是 Qt 版本问题导致的 CMakeLists.txt 或 qmake 的.pro 文件问题。 CMakeLists.txt的问
1421
0
0
Linux下cannot open shared object file解决
摘要:Linux下cannot open shared object file解决 问题描述 跑程序时,显示错误如下: ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory
1531
0
0
ubuntu解决软件安装依赖报错
摘要:ubuntu解决软件安装依赖报错 问题描述 安装yum时,提示 yum : 依赖: python-lzma 但是它将不会被安装 依赖: python-sqlitecachec 但是它将不会被安装 依赖: python-urlgrabber 但是它将不会被安装 E: 无法修正错误,因为您要求某些软件包
189
0
0
解决Ubuntu无法双击安装deb包
摘要:解决Ubuntu无法双击安装deb包 解决方法 检查是否使用的是“软件安装”工具打开,不要使用“存档管理器”打开; 使用命令安装: sudo apt install ./xxxxx.deb # 对于Debian 和基于 Debian 的系统,可用 dpkg -i Ubuntu 系统 dpkg 命令使
1162
0
0
报错:undefined reference to `WinMain'
摘要:报错:undefined reference to `WinMain' 错音是编译器找不到main()函数: 可能是 main() 函数没有加入编译。检查Makefile 可能缺少是main()函数,比如main拼写错误 可能是main()函数不再全局命名空间中,注意main()函数必须置于默认命名
1407
0
0
解决安装VS2022时,出现未能安装包"Microsoft.VisualCpp.Redist.14,version=14.32.31332,chip”=x86"
摘要:解决安装VS2022时,出现未能安装包"Microsoft.VisualCpp.Redist.14,version=14.32.31332,chip”=x86" 问题描述 之前安装过MS SQL Server和VS2022,但是后来又卸载了。现在重装VS2022出现两个报错: 无法安装Microso
4309
0
1
C++类中报错:class "xxx" does not name a type
摘要:# C++类中报错:class "xxx" does not name a type ## 原因 1. 引用的类命名空间未包含 2. 引用的类头文件未包含 3. 包含了头文件,或者已经前置声明了,则说明所引用的类名写错。 4. 循环引用头文件 5. 类内修改了类成员 [类中报错 xxx does n
697
0
0
443/80端口被占用的解决方案
摘要:# 443/80端口被占用的解决方案 ![img](https://pic1.zhimg.com/80/v2-32a4ce617fdceb3a73115a20b2127490_720w.webp) ## 443和80端口简介 这两个端口是OS完成网络通信的重要端口: - 80端口:用于HTTP协议,
2479
0
0
Qt报错:call to constructor of '_ConfigDaoImpl' is ambiguous
摘要:# Qt报错:call to constructor of '_ConfigDaoImpl' is ambiguous ## 原因 ```shell configform.cpp:4:13: error: call to constructor of '_ConfigDaoImpl' is ambi
433
0
0
QT构建报错error: multiple target patterns
摘要:# QT构建报错error: multiple target patterns ## 原因 之前一直没有出过问题,但是在我修改了cmd的默认编码后,该问题出现了。原因就是使用`chcp 65001`命令修改cmd编码的方式每次会在命令行中输入`Active code page: 65001`这句话,
748
0
0
【VS链接错误】LNK2019 无法解析的外部符号 _main
摘要:# 【VS链接错误】LNK2019 无法解析的外部符号 _main,函数 “int __cdecl invoke_main(void)“ (? invoke_main@@YAHXZ) 中引用了该符号 2种原因: 1. 链接器相关设置错误,详见:[【VS】LNK2019 无法解析的外部符号 _main
362
0
0
VS编译 error C2001: 常量中有换行符 中文无法通过编译
摘要:# VS编译 error C2001: 常量中有换行符 中文无法通过编译 只有部分中文会提示,并且有时报错又时不错。 2种解决方案: 1. 不用中文 2. 程序中添加`system("chcp 65001");`使用UTF-8字符编码,且在高级保存选项中选择unicode(utf-8带签名)
391
0
0