Compile cpp File Manually without IDE under Mingw Environment

环境准备。

安装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

时间: 2024-09-20 07:57:54

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

马士兵J2SE-第六章-常用类-基本数据类型包装类、Maths类、File类

基本数据类型包装类 public class test { public static void main(String[] args) { Integer i=new Integer(100); Double d=new Double("123.456"); int j=i.intValue()+d.intValue(); float f=i.floatValue()+d.floatValue(); System.out.println(j); System.out.println(

19款免费PHP IDE来袭

如果你是一个PHP程序员,那么你可能非常关注是否有免费的PHP IDE吧?小编在本文中为大家整理了一些免费.又好用的PHP IDE,敬请笑纳! Notepad++ Notepad++是一款Windows环境下免费开源的代码编辑器,支持的语言:C, C++ , Java , C#, XML, HTML, PHP, Javascript等!Notepad++ 不仅有语法高亮度显示,也有语法折叠功能,并且支援宏以及扩充基本功能的外挂模组. Bluefish Bluefish标榜其自身是"一款为熟练的W

How to decompile class file in Java and Eclipse - Javap command example(转)

  Ability to decompile a Java class file is quite helpful for any Java developer who wants to look into the source of any open source or propriety library used in project. Though I always prefer to attach source in Eclipse of most common libraries li

Python实现计算文件夹下.h和.cpp文件的总行数_python

平时自己写了很多代码,但从没好好计算总共写了多少行,面试时被问起来,就傻了...闲来无事,写个python程序来统计下 import os ################################################################################ def calcLine(baseDir): lineCount = 0 try: for fileName in os.listdir(baseDir): fullPath = baseDir +

Install and Compile MatConvNet: CNNs for MATLAB --- Deep Learning framework

Install and Compile MatConvNet: CNNs for MATLAB --- Deep Learning framework  2017-04-18  10:19:35    If you want to use matlab convnet, you just install according to the following tutorials:  1. Download and unzip the original source file from: http:

caffe: compile error : undefined reference to `cv::imread(cv::String const&, int)' et al.

when I compile caffe file : .build_debug/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'.build_debug/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<u

Is your .NET Code safe?

Is Your Code Safe? VS.NET's use of Microsoft Intermediate Language creates big advantages, but exposes VB.NET on the desktop. by Dan FergusURL: http://www.vbpj.com/upload/free/features/vbpj/2001/05may01/df0501/df0501-1.asp In the Visual Studio.NET (V

preload-classes的前世今生(1)

preload-classes的前世今生(1) preloaded-classes 在Zygote初始化的时候,会调用到ZygoteInit的main方法.在注册了ZygoteSocket的控制通道之后,就调用preload方法去加载一些预加载的数据. public static void main(String argv[]) { try { // Start profiling the zygote initialization. SamplingProfilerIntegration.st

Delphi 命令行编译指南

  Delphi 命令行编译指南 目录1. Command-line compiler命令行编译器2. Command-line compiler options命令行编译器选项3. Compiler directive options编译器指令选项4. Compiler mode options编译模式选项5. DCC32.CFG file编译器配置文件DCC32.CFG6. Debug options调试选项7. Directory options目录选项8. IDE command-lin