mingw

grep命令详解

人走茶凉 提交于 2020-04-07 09:02:17
1 简介 grep:基于正则表达式查找到满足条件的行 2 用法 grep patttern file grep- i pattern file 忽略大小写 grep -v pattern file 不显示匹配行 grep -o pattern file 把每个匹配的内容用独立的行显示 grep -E pattern file 使用扩展正则表达式 grep -A -B -C pattern file 打印命中数据的上下文 grep pattern -r dir/ 递归搜索 ps:一般不会过滤文件,而是用管道|从上游获取输入 3 例子 创建一个hello.txt文件,文件内容如下: Administrator@PC-20141114NHWZ MINGW64 /e/shell/file_folder $ cat hello.txt hello from hogwarts Hello from hogwarts hello from sevenriby hello from testerhome (1) 最简单的用法:查找包含“hello”关键词的行 Administrator@PC-20141114NHWZ MINGW64 /e/shell/file_folder $ grep hello hello.txt hello from hogwarts hello from

Qt 4.7.4 完美动态编译发布动态调试,以及静态编译发布

♀尐吖头ヾ 提交于 2020-04-04 06:17:33
原文地址: http://blog.csdn.net/cjyl25/article/details/6899229 首先是准备工作,去QT主页下载独立的QT类库安装包以及完整QT SDK安装包,还有QT Creator for windows 版 下载地址: http://qt.nokia.com/downloads-cn 最新是 4.7.4 版 还有一个mingw 4.4.5 静态编译版,用来解决mingwm10.dll、 libgcc_s_dw2-1.dll,两个DLL依赖的问题 下载地址是: http://code.google.com/p/qp-gcc/downloads/list 四个文件分别是: (1) qt-creator-win-opensource-2.3.1.exe // IDE 开发框架 (2) qt-win-opensource-4.7.4-mingw.exe // QT类库安装包 (3) Qt_SDK_Win_offline_v1_1_3_en.exe // QT SDK 完整安装包 (4) mingw-static-4.4.5-all.7z // mingw 静态编译完整版 准备好上面四个文件之后,就可以安装了,安装顺序以上面的(1)--(4)的顺序进行安装 下面说一下安装时需要注意的地方, 第一步:安装的是 qt-creator

MSYS2配置总结

流过昼夜 提交于 2020-04-02 17:34:22
MSYS2下载: http://www.msys2.org/ MSYS2是什么 MSYS2 (Minimal SYStem 2) 是一个MSYS的独立改写版本,主要用于 shell 命令行开发环境。同时它也是一个在Cygwin (POSIX 兼容性层) 和 MinGW-w64(从"MinGW-生成")基础上产生的,追求更好的互操作性的 Windows 软件。 MSYS2 [1] 是MSYS的一个升级版,准确的说是集成了pacman和Mingw-w64的Cygwin升级版, 提供了bash shell等linux环境、版本控制软件(git/hg)和MinGW-w64 工具链。与MSYS最大的区别是移植了 Arch Linux的软件包管理系统 Pacman(其实是与Cygwin的区别)。 特点 安装方便 自带 pacman 管理,可以使用 pkgtool 来 makepkg 较快的源速度(可以修改源地址) 自带软件和库较全而且比较新 使用mingw-w64工具链,可以编译32位或64位代码(需要自行安装) 中文支持好,可以直接输入和浏览中文目录 一、MSYS2的MirrorList配置 1、修改msys2安装目录下的/etc/pacman.d文件夹里面的3个mirrorlist.*文件 [mirrorlist.mingw32] #中国科学技术大学开源软件镜像 Server = http

MSVC 和 minGW .a .dll 等文件之间转换

风格不统一 提交于 2020-03-31 13:28:32
一、MSVC调用MINGW生成的dll和lib gcc -shared -o testdll.dll testdll.c-Wl,--output-def,testdll.def 生成dll文件和def文件 lib /machine:i386 /def:testdll.def 生成lib 文件和exp文件。(lib为MSVC的工具,可以在VS安装的bin目录下找到) 生成的dll文件和lib文件就可以被MSVC调用了。 注意:C++的dll不具有2进制级别的共享性,也就是说VC的MinGW的C++ dll不能混用。而C的dll却可以。 二、minGW调用MSVC生成的库 cl /LD testdll.c 生成dll文件和lib文件 gcc -o testmain.exe testmmain.c -ltestdll -L. 编译连接生成可执行程序 来源: https://www.cnblogs.com/lovesaber/archive/2012/11/27/2790297.html

Stdcall and DLL tools of MSVC and MinGW

倖福魔咒の 提交于 2020-03-31 13:27:12
Stdcall and DLL tools of MSVC and MinGW The __stdcall calling convention has been there for a very long time. While older calling conventions like __pascal fell into oblivion, __stdcall became the standard calling convention of Win32 API functions. Unlike __cdecl (the native calling convention of C/C++), it is supported in C/C++, Visual Basic, Java, and other languages alike, which makes it the first choice when building a DLL for cross-language use. The internal representations of both __cdecl and __stdcall functions have decorations . In MSVC (Microsoft Visual C++) and MinGW (Minimalistic

在WIN10上不用CMake和MinGW编译Android版本的OpenCV

青春壹個敷衍的年華 提交于 2020-03-23 23:26:29
3 月,跳不动了?>>> 构建编译项目 不需要安装CMake,MinGW等额外工具。只需要Android NDK和OpenCV源码 。 在WIN10上使用cmd窗口命令编译OpenCV步骤,操作版本为4.0.1: 在OpenCV根目录下面新建一个文件夹,比如叫做build_cmd。因为OpenCV要求 CMAKE_BINARY_DIR 不和 CMAKE_SOURCE_DIR 是同一个文件夹,所以不能在根目录下直接执行cmake cd到build_cmd 执行如下命令,路径对应修改 E:\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe ^ -DCMAKE_TOOLCHAIN_FILE=E:\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake ^ -DANDROID_NDK=E:\Android\Sdk\ndk-bundle ^ -DANDROID_ABI="arm64-v8a" ^ -DANDROID_SDK=E:\Android\Sdk ^ -DWITH_TBB=ON ^ -DCPU_BASELINE=NEON ^ -DCPU_DISPATCH=NEON ^ -DOPENCV_ENABLE_NONFREE=ON ^ -DBUILD_ANDROID_EXAMPLES=OFF

关于VScode在Windows环境下c_cpp_properties.json文件配置问题

[亡魂溺海] 提交于 2020-03-23 20:17:40
3 月,跳不动了?>>> 初次使用VScode,我们都会碰到一个问题,就是在编写C和C++源文件时,头文件提示未配置好等错误。关于这个问题,给出方案如下:我想大家碰到的最多的问题就是"includepath"的设置问题: 1. "C:/MinGW/include/**"为你们下载的MinGW的include文件夹路径 2.“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++”, “c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++”, “c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++/mingw32”, “c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++/backward”, “c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include”, “c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/…/…/…/…/include”, "c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include-fixed"这一块的获取方法为:cmd——》gcc -v -E -x c++ - 3.获取结果如下图所示: ---------

Build SIP and PyGlobalShortcut for Windows

若如初见. 提交于 2020-03-22 10:58:26
问题 I am writing a Python2.7/PyQt4 programm under Ubuntu, but the application will be deployed on a Windows platform. One of the functions is that the application should capture several keystrokes (e.g. "Alt+A") even if it is not in focus/minimized. I use PyGlobalShortcut for this purpose, which is a Python/SIP wrapper around libxqt. Following the manual, I installed Qt4 + SIP and ran the pip install PyGlobalShortcut command, which automatically compiled and installed the libqxt library and the

C++ memory allocation: 'new' throws bad_alloc?

这一生的挚爱 提交于 2020-03-22 10:27:17
问题 In my application I save voxel-data (compressed byte array) and trying to load it back again into memory. But my application crashes in Windows 7 machine (64 bit ,12 GB) giving bad_alloc . This works fine on Linux ,and even runs on some other Windows 7 machine with 4 GB memory. Compressed bye size is about 200Mb and uncompressed byte size is about 300Mb.(so only 500 MB reserved before this 'new' statement,which leaves almost 8 GB excluding system memory ). I don't run any other major memory

C++ memory allocation: 'new' throws bad_alloc?

喜你入骨 提交于 2020-03-22 10:27:14
问题 In my application I save voxel-data (compressed byte array) and trying to load it back again into memory. But my application crashes in Windows 7 machine (64 bit ,12 GB) giving bad_alloc . This works fine on Linux ,and even runs on some other Windows 7 machine with 4 GB memory. Compressed bye size is about 200Mb and uncompressed byte size is about 300Mb.(so only 500 MB reserved before this 'new' statement,which leaves almost 8 GB excluding system memory ). I don't run any other major memory