﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-开始编程-文章分类-准备工作</title><link>http://www.cppblog.com/hx0hx/category/12080.html</link><description>计算机真麻烦</description><language>zh-cn</language><lastBuildDate>Sat, 31 Mar 2012 18:01:12 GMT</lastBuildDate><pubDate>Sat, 31 Mar 2012 18:01:12 GMT</pubDate><ttl>60</ttl><item><title>设置环境变量</title><link>http://www.cppblog.com/hx0hx/articles/98867.html</link><dc:creator>黄鑫</dc:creator><author>黄鑫</author><pubDate>Sun, 18 Oct 2009 02:56:00 GMT</pubDate><guid>http://www.cppblog.com/hx0hx/articles/98867.html</guid><description><![CDATA[<div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;计算机中安装了很多程序，如何在命令行式的 shell 中调用这些程序呢？</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;可以用这样的命令： 路径名/程序名 （UNIX 类的系统中的方式） 或 路径名\程序名 （Windows 系统中的方式） 来调用指定的程序。但是每次调用程序都要输入路径是很麻烦的，如果只输入程序的名字就能调用它该多好啊！</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;为了达到这样的目的，我们需要修改操作系统的环境变量 PATH 。PATH 的值就是操作系统搜寻本地程序的目录列表。</span></div><div></div><div></div><div><span style="background-color: rgba(0, 0, 0, 0);">设置 PATH 环境变量：</span></div><div></div><div><span style="background-color: rgba(0, 0, 0, 0);">（1） UNIX 类的操作系统中，操作方式与使用的 shell 有关。</span></div><div></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;如果用的是 csh ，在 ~/.cshrc 文件末尾添加 set path=(程序所在目录的绝对路径 $path)</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp; &nbsp; 如果用的是 bash ，在 ~/.bashrc 文件或 ~/.bash_profile 文件末尾添加 export PATH="程序所在目录的绝对路径:$PATH"</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;【注意】这里用英文冒号&#8220;:&#8221;来分隔不同的路径。</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;其他 shell 类似。</span></div><div></div><div><span style="background-color: rgba(0, 0, 0, 0);">（2） Windows NT/2000/XP/2003/Vista/2008/7 操作系统中</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;（可能需要用管理员身份登录）用右键单击&#8220;我的电脑&#8221;，选择&#8220;属性&#8221;，打开&#8220;系统属性&#8221;对话框，单击&#8220;高级&#8221;标签，单击&#8220;环境变量&#8221;按钮，会弹出&#8220;环境变量&#8221;对话框，编辑&#8220;用户变量&#8221;框中的 Path 变量（没有就新建），会弹出&#8220;编辑用户变量&#8221;对话框，在&#8220;变量值&#8221;中添加&#8220;程序所在目录的绝对路径&#8221;（不加冒号），用英文分号&#8220;;&#8221;把新加的内容和已有的内容隔开。然后一路&#8220;确定&#8221;就行了，不用重启计算机即可使设置生效。</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;【注】如果想让该 Windows 系统的所有用户都能使用这样简单的方式调用特定的程序，则需要修改&#8220;系统变量&#8221;框中 Path 的值。</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp;&nbsp; &nbsp;【注意】&#8220;系统变量&#8221; Path 的优先级比&#8220;用户变量&#8221; Path 的优先级高，所以在某些情况下要调整目录的顺序。</span></div><img src ="http://www.cppblog.com/hx0hx/aggbug/98867.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/hx0hx/" target="_blank">黄鑫</a> 2009-10-18 10:56 <a href="http://www.cppblog.com/hx0hx/articles/98867.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>安装 MinGW GCC 4.4.0</title><link>http://www.cppblog.com/hx0hx/articles/98850.html</link><dc:creator>黄鑫</dc:creator><author>黄鑫</author><pubDate>Sat, 17 Oct 2009 14:11:00 GMT</pubDate><guid>http://www.cppblog.com/hx0hx/articles/98850.html</guid><description><![CDATA[




MinGW 主页： http://www.mingw.org&nbsp;<br>下载地址： http://sourceforge.net/projects/mingw/files/&nbsp;<br><br>根据官方给出的 GCC 4.4.0 安装指南，需要下载以下文件：<br><br>[MinGW 基础]<br>&nbsp;&nbsp; &nbsp;GNU Binutils<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;binutils-2.19.1-mingw32-bin.tar.gz<br>    <br>&nbsp;&nbsp; &nbsp;MinGW Runtime<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;mingwrt-3.16-mingw32-dev.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;mingwrt-3.16-mingw32-dll.tar.gz<br><br>&nbsp;&nbsp; &nbsp;MinGW API for MS-Windows<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;w32api-3.13-mingw32-dev.tar.gz<br><br><br><br>[GCC Version 4]<br>&nbsp;&nbsp; &nbsp;GMP Runtime [必须]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gmp-4.2.4-mingw32-dll.tar.gz<br><br>&nbsp;&nbsp; &nbsp;libiconv Runtime [必须]  //MinGW liniconv 条目下&nbsp;<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;libiconv-1.13-mingw32-dll-2.tar.gz<br><br>&nbsp;&nbsp; &nbsp;MPFR Runtime [必须]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;mpfr-2.4.1-mingw32-dll.tar.gz<br><br>&nbsp;&nbsp; &nbsp;POSIX Threads for Win32 Runtime [必须]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;pthreads-w32-2.8.0-mingw32-dll.tar.gz<br><br>&nbsp;&nbsp; &nbsp;Core (C) [必须]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-core-4.4.0-mingw32-bin.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-core-4.4.0-mingw32-dll.tar.gz<br>	<br>	<br>&nbsp;&nbsp; &nbsp;C++ [选装]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-c++-4.4.0-mingw32-bin.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-c++-4.4.0-mingw32-dll.tar.gz<br>	<br>&nbsp;&nbsp; &nbsp;Java [选装]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-java-4.4.0-mingw32-bin.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-java-4.4.0-mingw32-dll.tar.gz<br>	<br>&nbsp;&nbsp; &nbsp;Objective-C [选装]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-objc-4.4.0-mingw32-bin.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-objc-4.4.0-mingw32-dll.tar.gz<br><br>&nbsp;&nbsp; &nbsp;Ada [选装]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-ada-4.4.0-mingw32-bin.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-ada-4.4.0-mingw32-dll.tar.gz<br>	<br>&nbsp;&nbsp; &nbsp;Fortran [选装]<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-fortran-4.4.0-mingw32-bin.tar.gz<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gcc-fortran-4.4.0-mingw32-dll.tar.gz<br>	<br>	<br>[其他工具]<br>&nbsp;&nbsp; &nbsp;GNU Make<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;make-3.81-20090914-mingw32-bin.tar.gz<br>    <br>&nbsp;&nbsp; &nbsp;GNU Source-Level Debugger<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;gdb-7.0.2-mingw32-bin.tar.gz<br><br><br>    下载完所需的文件以后，新建一个目录，如 D:\MinGW （目录路径中不能包含空格），记为 %MinGW% 。<br>    <br>    把下载的文件解压到 %MinGW% 中，如果遇到重复的文件，看文件的修改日期，用新文件覆盖旧文件即可。<br>    <br>    在 PATH 变量中加入 %MinGW%\bin 。<br>    <br>    OK!!!<br><br><img src ="http://www.cppblog.com/hx0hx/aggbug/98850.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/hx0hx/" target="_blank">黄鑫</a> 2009-10-17 22:11 <a href="http://www.cppblog.com/hx0hx/articles/98850.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>