环境准备。

安装mingw并设置好系统PATH。

mingw。windows下的GUN编程环境。

系统变量的作用——可运行文件的搜索路径。

这样在cmd直接输入g++就能调用到D:\Program Files (x86)\CodeBlocks\MinGW\bin\g++.exe。

打开cmd后的默认工作文件夹为 C:\Users\Administrator。

g++与gcc。

gcc仅仅负责编译,不负责链接标准库,所以直接生成exe程序的话要用g++,它会调用gcc。

g++ hi.cpp -o hi   可生成hi.exe

Compile cpp File Manually without IDE under Mingw Environment的更多相关文章

  1. Xamarin 示例Standard Controls报错:xamarin Failed to compile interface file. See Build Output for details

    Standard Controls 示例下载地址: http://developer.xamarin.com/content/StandardControls/ Xamarin官网上的IOS示例“St ...

  2. c++ why can't class template hide its implementation in cpp file?

    类似的问题还有: why can't class template use Handle Class Pattern to hide its implementation? || why there ...

  3. oc与c语言的相互调用

    一:OC调用C语言 C语言的.h文件 // // TestPrint.h // TestDemo // // Created by Techsun on 14-8-12. // Copyright ( ...

  4. compile and link C/CPP programs on Mac

    ref: https://stackoverflow.com/questions/29987716/cannot-use-gsl-library-on-macos-ld-symbols-not-fou ...

  5. Clion+Cmake+Qt5+Qwt+msys2+MinGW在Windows下的安装配置使用教程

    摘要: CLion, a cross-platform C/C++ IDE. 本文主要介绍基于Clion作为IDE, MinGW作为编译器,CMake作为项目构建工具,开发基于Qt5.qwt的C++图 ...

  6. "Hello World!" for the NetBeans IDE

    "Hello World!" for the NetBeans IDE It's time to write your first application! These detai ...

  7. use zlib lib to compress or decompress file

    If you want to compress or decompress file when writing C++ code,you can choose zlib library,that's ...

  8. 原文:I don’t want to see another “using namespace xxx;” in a header file ever again

    http://stackoverflow.com/questions/5849457/using-namespace-in-c-headers http://stackoverflow.com/que ...

  9. build-qt.sh(Cross compile in Linux for Windows)

    #!/bin/bash set -e MINGW=${MINGW:-${ARCH:-x86_64}-w64-mingw32} PREFIX=${PREFIX:-usr} WORKSPACE=${WOR ...

随机推荐

  1. 如何在Windows环境下模拟丢包

    [本文出自天外归云的博客园] Q&A Question: How to simulate packet loss on Windows? Answer: Clumsy, an utility ...

  2. Liunx下Intel无线网卡驱动安装

    原文: https://blog.csdn.net/u014157776/article/details/78272611 首先查看网卡型号,指令: lspci | grep -i net 如果是In ...

  3. 把git上面的scala工程转为eclipse工程

    1,安装sbt工具,url:https://www.cnblogs.com/zeling/p/8494828.html 2,把插件添加到plugins.sbt文件中: addSbtPlugin(&qu ...

  4. 5. 支持向量机(SVM)软间隔

    1. 感知机原理(Perceptron) 2. 感知机(Perceptron)基本形式和对偶形式实现 3. 支持向量机(SVM)拉格朗日对偶性(KKT) 4. 支持向量机(SVM)原理 5. 支持向量 ...

  5. poj3073

    比赛状态堪忧,笑看自己找不着北.. 把心态放好吧- - 反正窝从一開始就仅仅是为了多学习才上道的 至少已经从学习和智商上给窝带来了一些帮助 智商带不动,好辛苦----(>_<)---- 说 ...

  6. putty配色备份

    [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Solarized%20Dark] "Colour0"="1 ...

  7. am335x u-boot2011.09 SPL 流程跟踪

    跟踪一下 u-boot 2011.09 MLO在 nandflash 下运行的流程 首先,直接进入 start.S // arch/arm/cpu/armv7/start.S 36 .globl _s ...

  8. python json 数据操作

    python 有专门针对 json 操作的函数 #!/usr/bin/python3 import json mytest_js = { "a" : 1, "b" ...

  9. Redis提供的持久化机制(一)

    Redis提供的持久化机制 redis是一个内存数据库,也就是说它的所有的数据都是保存在内存中的,而内存中的数据当程序结束时就会消失,所以我们要想办法把内存中的数据写到磁盘中.当程序异常退出或者正常退 ...

  10. PostgreSQL学习手册(数据表)<转>

    一.表的定义: 对于任何一种关系型数据库而言,表都是数据存储的最核心.最基础的对象单元.现在就让我们从这里起步吧.    1. 创建表:    CREATE TABLE products (      ...