环境准备。

安装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. docker之创建MariaDB镜像的方法

    一.基于commit命令方式创建 docker的安装 ? 1 2 3 [root@test01 ~]# yum install docker [root@test01 ~]# systemctl en ...

  2. splitter 使用

    splitter1.Width = ; splitter1.Height = ; Label l = new Label(); l.Text = "···"; //写入的字,具体指 ...

  3. Git CMD连接,管理(remote,add,commit,push)github repository

    git initmd testcd testgit statusgit add test  //git add test/a.txtgit status git remote add origin g ...

  4. Linux下如何查看tomcat是否启动,并杀死重启

    在Linux系统下,遇到过这样的问题,项目中使用 ./shutdown.sh 关闭Tomcat失败 Using CATALINA_BASE: /usr/local/tomcat Using CATAL ...

  5. Unity3D-RPG项目实战(4):角色性能測试

    前言 用一个新的引擎.还是要沉下心来学习.记得2007年用Unreal Engine 3做项目的时候.就有过慘痛的教训:前面话了个把月的时间学习Unreal.认为摸门了.于是就着急忙慌的进入项目正式开 ...

  6. linux 正则表达式和通配符

    linux 正则表达式和通配符 通配符用于查找文件 包含三种:  * ? [] * 代表任意个任意字符 ? 代表任意一个字符 [] 代表中括号中的一个字符 正则表达式(正则是包含匹配,只要包含就可以匹 ...

  7. Spring Cloud 5分钟搭建教程(附上一个分布式日志系统项目作为参考) - 推荐

    http://blog.csdn.net/lc0817/article/details/53266212/ https://github.com/leoChaoGlut/log-sys 上面是我基于S ...

  8. 8大排序算法总结 JS 实现

    //bubble sort ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 fun ...

  9. Linux source命令

    Linux source命令   Linux source命令: 通常用法:source filepath 或 . filepath 功能:使当前shell读入路径为filepath的shell文件并 ...

  10. 自然语言交流系统 phxnet团队 创新实训 项目博客 (六)

    从你进入软件开始,你就建立了和服务器的联系.这是一段和服务器的长连接,直到你退出此软件. 2D文字聊天界面大致实现了文字输入.发送消息.接收消息.你可以通过点击按钮让机器人开启聊天模式或者学习模式.又 ...