环境准备。

安装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. C#正则表达式提取HTML中IMG标签的SRC地址

    一般来说一个 HTML 文档有很多标签,比如“<html>”.“<body>”.“<table>”等,想把文档中的 img 标签提取出来并不是一件容易的事.由于 i ...

  2. 获得discuz7.2 目录下所有文件,并写到txt

    # -*- coding: utf-8 -*- import os fileList = [] dzList = [] def GetFileList(path): List = [] for roo ...

  3. Node.js学习笔记(1)--一个最简单的服务器请求

    说明(2017-5-2 10:27:03): 1. 需要安装node,http://nodejs.cn/download/ 2. 安装完后,在cmd里输入node -v可以查看版本. 3. 代码foo ...

  4. Pandas.plot 做图 demo(scatter,bar,pie)

    #coding:utf-8import numpy as npimport matplotlib.pyplot as pltplt.rcParams['font.sans-serif']=['SimH ...

  5. 【微信小程序】Page页面跳转(路由/返回)并传参

    页面跳转的方法参考官方文档: https://mp.weixin.qq.com/debug/wxadoc/dev/framework/app-service/route.html 问题:使用wx.na ...

  6. sam9260 闲鱼

    开发板 https://2.taobao.com/item.htm?spm=2007.1000338.6.8.5vXVdv&id=534550318896 核心板 https://item.t ...

  7. (转)spark日志配置

    一.第一部分 1.spark2.1与hadoop2.7.3集成,spark on yarn模式下,需要对hadoop的配置文件yarn-site.xml增加内容,如下: <property> ...

  8. destoon 添加一个新的模块

    根目录rename,中config.inc.php文件/module/rename下两个文件,my.inc.php ,rename.class.php/module/rename/admin/三个文件 ...

  9. IE兼容性视图设置

    问题: 页面 http://course.upol.cn/lx/jzjjygl/index.html 的课程学习中课程打不开 看了代码是有浏览器版本要求,IE9以上无法访问 解决办法: 1. 在IE设 ...

  10. JavaScript(三):数据类型转换

    一.转换函数 1.parseInt() parseInt()函数可以将任何类型的值转换为整数. 例如: <!DOCTYPE html> <html lang="en&quo ...