当前位置:网站首页>1. The solution of line feed qt5- "vs" in constants; 2. Problems and solutions of common compilation of QT and vs of the same code
1. The solution of line feed qt5- "vs" in constants; 2. Problems and solutions of common compilation of QT and vs of the same code
2022-07-22 18:58:00 【Moon cave】
1. Line breaks in constants Qt5-》vs Solutions for
Original address :https://blog.csdn.net/CuteSoap/article/details/79718165
Today will be qt The project from mingw Turn into msvc2013 Compile time , Chinese character error , After finding online methods , Get a satisfactory solution .
The file format is still the default UTF-8 Format .
1. use Sublime Wait until the editor will Open the code file with Chinese characters , And UTF-8 withBOM Format preservation
Save the code only for main.cpp, Two files need to be saved twice
2. Open the project , Then save the code file of Chinese characters In the header file Add a line of code
#pragma execution_character_set("utf-8")
Use this way vc Our compiler can also compile utf-8 Format code .
2020-09-11
If the source code is saved without BOM Of utf-8. That needs to be told VS2015 Our coding format is utf-8, Can be in pro Add the following code to the file :
msvc:QMAKE_CXXFLAGS += -source-charset:utf-8
2. The same code Qt and vs Problems and solutions of CO compilation
1. The compilation paths of the two are different ,Qt Generally, it is the shadow path ,VS Generally, it is the current path (pro route )
2. When VS When compiling, it will be in , Current path generation ui file , Lead to Qt Compile time , No new ui file , But read VS Compilation of
UI_DIR = temp/ui;VS:pro/temp/ui;Qt:build/temp/ui
3. Involving external dynamic libraries , Reading configuration file , Both cannot be reused at compile time
DESTDIR = $$PWD/bin, Ensure that both are generated exe And so on
4.UTF-8 and UTF-8 BOM Solutions for
see Line breaks in constants Qt5-》vs Solutions for
5. Due to time code reuse ,VS You need to reopen it every time you compile pro file
边栏推荐
- 1.雷点:mysql数据库转移到oracle,2.qt5.12.3 连接oracle 12c数据库
- LeetCode 2028. 找出缺失的观测数据
- Summary of all usage of join in SQL syntax (simple example)
- IP address, CIRD format URL, hostname regular expression
- Flink学习笔记(五)DataStream API
- 程序员面试金典面试题 01.05. 一次编辑
- Leetcode 654. maximum binary tree
- 微信扫网址的二维码,却只显示链接地址,无法跳转到网页的解决办法
- Go language learning: go language journey - exercise questions and reference answers
- bjyx
猜你喜欢
Vlfeat, pydot configuration
How to resolve errors in executing the yum makecache command
模块TensorFlow中没有Session
Flink learning notes (III) Flink installation and deployment
Strncpy() copy string (limited by length)
1.Qt之打包发布程序 (NSIS);
Over the weekend, I had a dinner with the technology gurus and talked about the "golden nine and silver ten" peak of the software testing industry [the trend of involution has been formed]
在各类数据库中随机查询n条数据
MySQL statement execution order
JVM-JVM概述
随机推荐
IP地址、CIRD格式网址、主机名正则表达式
QT | modal dialog and modeless dialog qdialog
1. MySQL null and in; What is 2.127.0.0.2?
The database is garbled. Do you want to find a solution?
Leetcode 304. two dimensional area and retrieval - matrix immutable
Sub database and sub table
连接mysql8.0出现caching-sha2-password问题
Flink学习笔记(六)Flink的时间和窗口
Summary 20220211
sql 语法中 join 的所有用法总结(简单例子)
国内 Ngrok 实现内网穿透
BigDecimal中除法divide()方法的详细解析,带你走进源码的world
写作单词积累
各种技术资料汇总-MYSQL
shell变量操作${}详细用法
项目启动过后,一直循环加载mapper xml文件
LeetCode 116. 填充每个节点的下一个右侧节点指针
Flink学习笔记(五)DataStream API
JSON序列化对象时,如何返回有空值的带属性名称json字符串?
Leetcode 654. maximum binary tree