mingw

How to define UNICODE for mingw, if use CMAKE as building system

北城以北 提交于 2021-01-22 12:04:04
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

How to define UNICODE for mingw, if use CMAKE as building system

六月ゝ 毕业季﹏ 提交于 2021-01-22 12:01:37
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

How to define UNICODE for mingw, if use CMAKE as building system

…衆ロ難τιáo~ 提交于 2021-01-22 12:00:27
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

How to define UNICODE for mingw, if use CMAKE as building system

╄→尐↘猪︶ㄣ 提交于 2021-01-22 11:57:50
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

Go语言开发Excel导表工具(上)

て烟熏妆下的殇ゞ 提交于 2021-01-19 07:55:24
Go语言开发Excel导表工具(上) 前言 游戏开发中经常会遇到将Excel文件导出配置的需求,鉴于之前的导表工具面对数据比较多的表格(尤其是多语言表格)导致导表速度很慢,因此想自己实现一个导表工具。 调研 目前市面上编程语言比较多:Node、Python、C#、Go... 以前项目中有用C#的也有用Python的,对比发现Python导表还是挺快的。(后来发现其实使用不同的Excel读取插件,执行效率还各有不同)在前期调研中发现了网站 https://zhuanlan.zhihu.com/p/29847628 , 里面说是Go语言执行效率高,那就拿他试试吧。 Go语言 其实对于新语言,一开始就要了解它的语法,这里推荐一个网站 https://www.runoob.com/go/go-tutorial.html 里面都是一些简单的基础语法。 环境配置 目前选用JetBrains公司的GoLand编程工具 下载Go https://golang.google.cn/dl/ 下载GoLand https://www.jetbrains.com/go/ 安装好之后这里需要设置一下GOPATH, 如图的目录就是用来下载后面Go语言相关的package包。 开发 Go语言需要一个main函数,同一个文件夹下面的文件的package包名必须要一致,不然IDE会报错。具体的导表逻辑下篇会介绍。

1 visual studio code 配置C++开发环境 (windows 开发环境)

核能气质少年 提交于 2021-01-11 10:00:04
0 引言 最近帮GF(不幸变成ex了)配置C++开发环境,一开始想给她装个visual studio13完事,但是一想到自己安装以及使用时的诸多麻烦,就有点退却,觉得没有这个必要。正好了解到vscode大行其道,决定按照官网指示配置一版。由于本人非计算机科班出身,对编译原理了解不多,在配置环境的时候遇到了一些麻烦,参照网上的诸多教程,最后发现还是官网比较靠谱,所以结合自己配置的教训,写个帖子,希望能够帮到大家。 1 下载安装vscode 下载网址链接如下。 https://code.visualstudio.com/ 直接下载安装即可。 2 配置语言 1)shift + ctrl + P,打开命令行。 2)在输入框中输入“Configure Display Language”,点击打开locale.json. 3) 编辑locale.json文件,如图所示。“locale”: "zh-CN"保存,然后重新打开编辑器即可。 3 安装C/C++相关插件,包括以下插件。 1)C/C++ 2)C++ Intellisense 3) Chinese(Simplified)中文简体 4 安装C++ 编译器 选择安装tdm64-gcc-5.1.0-2.exe,下载网址链接如下。 https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC

Qt教程 笔记1

柔情痞子 提交于 2021-01-08 10:53:09
Qt教程 ( http://c.biancheng.net/qt/ ) 安装QT 配置环境变量 右键[我的电脑]/[属性]/[高级系统设置]/[高级]/[环境变量]/[系统变量]/选[Path]/[编辑] 添加如下内容 C:\Qt\Qt5.9.8\5.9.8\mingw53_32\bin; C:\Qt\Qt5.9.8\5.9.8\msvc2013_64; 工程 路径不能包含中文 ,否则如下错误提示 Cannot find file: E:\Users\Administrator\Qt_Project\ Qt5 范例开发大全 \QtWindowsTest\QtWindowsTest.pro. 18:01:13: 进程"C:\Qt\Qt5.9.8\5.9.8\msvc2013_64\bin\qmake.exe"退出,退出代码 2 。 Error while building/deploying project QtWindowsTest (kit: Desktop Qt 5.9.8 MSVC2013 64bit) The kit Desktop Qt 5.9.8 MSVC2013 64bit has configuration issues which might be the root cause for this problem. When executing step

图解Qt安装(Windows平台)

ε祈祈猫儿з 提交于 2021-01-07 05:35:11
http://c.biancheng.net/view/3858.html 本节介绍 Qt 5.9.0 在 Windows 平台下的安装,请提前下载好 Qt 5.9.0。不知道如何下载 Qt 的读者请转到: Qt下载(多种下载通道+所有版本) 目前较高版本的 Qt 仅支持 Win7 及其以后的操作系统,不支持 Win XP;使用 Win XP 的读者请安装 Qt 5.5.1 之前的版本。 Qt 占用的存储空间很大,安装之前建议先准备好 8GB 以上的磁盘空间。对于目前 Qt 最新版开发环境,如果不安装源代码包,实际占用大约 5.5GB;如果选择安装源码包,大约占用 7.5GB。 双击下载得到的 qt-opensource-windows-x86-5.9.0.exe 即可开始安装。Qt 的安装过程和普通的 Windows 软件一样,按照向导进行操作即可。    关于 Qt 的安装需要说明以下几点。 1) 注册和登录 Qt 在安装过程中会提示用户进行注册和登录,不用理会,跳过(Skip)即可,实际开发时不需要登录。 图1:Qt 安装过程中提示用户注册 2) 安装路径和关联文件 图2:指定 Qt 安装路径 Qt 允许用户自定义安装路径,但是请注意,安装路径不能带空格、中文字符或者其它任何特殊字符。 另外,该界面还会询问是否关联特定的文件类型。如果关联(默认是关联的),特定后缀的文件(包括

Linking C library with a C++ dll: “unresolved external symbol __mingw_vsnprintf”

ⅰ亾dé卋堺 提交于 2021-01-07 01:37:27
问题 I've built a C++ Windows dll using Visual Studio - a.dll . I used Cygwin and MinGW ( x86_64-w64-mingw32-gcc ) to build a helper C library - helper.lib . The dll needs to use the helper library, so I modified Visual Studio project, tried to link with the library, but I get: error LNK2019: unresolved external symbol __mingw_vsnprintf referenced in function inquiry where inquiry is one of the functions inside helper.lib . What am I doing wrong? 来源: https://stackoverflow.com/questions/65494567

在Code::Blocks中使用SDL

为君一笑 提交于 2021-01-04 10:15:03
1首先你需要下载SDL头文件和二进制文件。 你可以在SDL的官方网站上找到它们 向下滚动到Development Libraries部分 下载Mingw32开发包。 打开gz压缩包,里面应该有个tar压缩包。 打开tar压缩包 ,里面应该有一个文件夹。 将这个文件夹拷贝到你喜欢的任意地方。 在本教程中,我把它放在C:\根目录 2启动Code:Blocks,然后进入设置菜单里的编译器和调试器。 3单击搜索目录选项卡中的编译器选项卡,单击添加: 然后将你解压出来的SDL目录中的“include”文件夹加入列表中。 4然后在连接器选项卡下面添加SDL目录中的“lib”文件夹: 5现在你需要将SDL目录中“bin”文件夹下的SDL.dll拷贝到你将要建立工程的地方。在编译程序时,你需要将SDL.dll和编译生成的exe放在同一个目录中。 另外,你也可以将SDL.dll拷贝到 “C:\WINDOWS\SYSTEM32”目录下,这样虽然SDL.dll与你的SDL程序不在同一个目录下,但程序仍能找到它。当然,如果你在使用64位的Windows系统,你就得把dll放于“C:\Windows\SysWOW64”目录中。 可是,这样处理存在一个问题:如果你有多个使用不同版本SDL库的应用程序,这会导致版本冲突。如果你将SDL 1.2.8放于System32中,而应用程序使用的是1.2.13