<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>绿色记忆 &#187; MinGW</title>
	<atom:link href="https://blog.gmem.cc/tag/mingw/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.gmem.cc</link>
	<description></description>
	<lastBuildDate>Fri, 10 Apr 2026 07:50:36 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.14</generator>
	<item>
		<title>基于MinGW的海康视频监控开发</title>
		<link>https://blog.gmem.cc/hikvision-video-monitoring-development-with-mingw</link>
		<comments>https://blog.gmem.cc/hikvision-video-monitoring-development-with-mingw#comments</comments>
		<pubDate>Thu, 15 May 2014 03:38:33 +0000</pubDate>
		<dc:creator><![CDATA[Alex]]></dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Graphic]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[Multimedia]]></category>

		<guid isPermaLink="false">http://blog.gmem.cc/?p=3535</guid>
		<description><![CDATA[<p>工程配置 项 说明  集成开发环境 Eclipse 4.3.2 + MinGW工具链（TDM-GCC 4.8） 工程配置 工程类型：C++ Project宏定义：_WIN32、UNICODE头文件路径：D:\CPP\tools\CH-HCNetSDK\win32-4.3.0.6\include依赖库：HCNetSDK库路径：D:\CPP\tools\CH-HCNetSDK\win32-4.3.0.6\dllLinker flags：-mwindows 基于SDK直接解码的直播样例 [crayon-69d915d738951001324349/]</p>
<p>The post <a rel="nofollow" href="https://blog.gmem.cc/hikvision-video-monitoring-development-with-mingw">基于MinGW的海康视频监控开发</a> appeared first on <a rel="nofollow" href="https://blog.gmem.cc">绿色记忆</a>.</p>
]]></description>
				<content:encoded><![CDATA[<div class="wri_content_clear_both"><div class="blog_h2"><span class="graybg">工程配置</span></div>
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="5">
<thead>
<tr>
<td style="width: 150px; text-align: center;">项</td>
<td style="text-align: center;">说明 </td>
</tr>
</thead>
<tbody>
<tr>
<td>集成开发环境</td>
<td>Eclipse 4.3.2 + MinGW工具链（TDM-GCC 4.8）</td>
</tr>
<tr>
<td>工程配置</td>
<td>工程类型：C++ Project<br />宏定义：_WIN32、UNICODE<br />头文件路径：D:\CPP\tools\CH-HCNetSDK\win32-4.3.0.6\include<br />依赖库：HCNetSDK<br />库路径：D:\CPP\tools\CH-HCNetSDK\win32-4.3.0.6\dll<br />Linker flags：-mwindows</td>
</tr>
</tbody>
</table>
<div class="blog_h2"><span class="graybg">基于SDK直接解码的直播样例</span></div>
<pre class="crayon-plain-tag">/*
 * SDKDirectPlayBack.cpp
 *
 *  Created on: May 14, 2014
 *      Author: WangZhen
 */
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include "HCNetSDK.h"
#include &lt;time.h&gt;

class RealPlayInfo
{
    public:
        LONG lUserID;
        LONG lRealPlayHandle;
        RealPlayInfo() :
                lUserID( -1 ), lRealPlayHandle( -1 )
        {
        }
        ;
        bool isSucceed()
        {
            return this-&gt;lUserID &gt;= 0;
        }
};
void CALLBACK g_ExceptionCallBack( DWORD dwType, LONG lUserID, LONG lHandle, void* pUser )
{
    switch ( dwType )
    {
        case EXCEPTION_RECONNECT :
            printf( "Reconnecting...%d\n", time( NULL ) );
            break;
        default :
            break;
    }
}

RealPlayInfo* StartRealPlay( HWND hWnd, char* ip, int port = 8000, int chnl = 1, char* user = "admin", char* pswd = "12345" )
{
    RealPlayInfo* info = new RealPlayInfo;
    NET_DVR_DEVICEINFO_V30 struDeviceInfo;
    info-&gt;lUserID = NET_DVR_Login_V30( ip, 8000, user, pswd, &amp;struDeviceInfo ); //登录
    if ( info-&gt;lUserID &lt; 0 )
    {
        printf( "Failed to logged on to %s, Error Code: %d\n", ip, NET_DVR_GetLastError() );
        return info;
    }
    else
    {
        printf( "Logon successful.\n" );
    }
    NET_DVR_SetExceptionCallBack_V30( 0, NULL, g_ExceptionCallBack, NULL );
    //启动预览并设置回调数据流
    NET_DVR_PREVIEWINFO struPlayInfo = { 0 };
    //使用SDK直接解码
    struPlayInfo.hPlayWnd = hWnd;
    //预览通道号
    struPlayInfo.lChannel = chnl;
    //0主码流，1子码流
    struPlayInfo.dwStreamType = 0;
    //0 TCP，1 UDP，2 多播，3 RTP，4 RTP/RTSP，5 RSTP/HTTP
    struPlayInfo.dwLinkMode = 0;
    //0- 非阻塞取流，1- 阻塞取流
    struPlayInfo.bBlocked = 1;
    info-&gt;lRealPlayHandle = NET_DVR_RealPlay_V40( info-&gt;lUserID, &amp;struPlayInfo, NULL, NULL );
    if ( info-&gt;lRealPlayHandle &lt; 0 )
    {
        printf( "Failed to start RealPlay.\n" );
        NET_DVR_Logout( info-&gt;lUserID );
        return info;
    }
    else
    {
        printf( "RealPlay started successfully.\n" );
    }
    return info;
}
void StopRealPlay( RealPlayInfo* info )
{
    if ( !info-&gt;isSucceed() ) return;
    printf( "Stopping RealPlay.\n" );
    //停止预览
    NET_DVR_StopRealPlay( info-&gt;lRealPlayHandle );
    //注销用户
    NET_DVR_Logout( info-&gt;lUserID );
}

LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); //窗口过程声明

int main()
{
    HINSTANCE hInstance = GetModuleHandle( NULL );
    static TCHAR szAppName[] = TEXT( "HikSDKDirectPlayBack" );
    HWND hWnd;
    MSG msg;
    WNDCLASS wndclass;
    wndclass.style = CS_HREDRAW | CS_VREDRAW;
    wndclass.lpfnWndProc = WndProc;
    wndclass.cbClsExtra = 0;
    wndclass.cbWndExtra = 0;
    wndclass.hInstance = hInstance;
    wndclass.hIcon = LoadIcon( NULL, IDI_APPLICATION );
    wndclass.hCursor = LoadCursor( NULL, IDC_ARROW );
    wndclass.hbrBackground = ( HBRUSH ) GetStockObject( BLACK_BRUSH );
    wndclass.lpszMenuName = NULL;
    wndclass.lpszClassName = szAppName;
    RegisterClass( &amp;wndclass );
    int w = 640;
    int h = 480;
    hWnd = CreateWindow(
            szAppName,
            TEXT("MinGW海康SDK直播实例"),
            WS_OVERLAPPEDWINDOW,
            (GetSystemMetrics(SM_CXSCREEN) - w)/2,
            (GetSystemMetrics(SM_CYSCREEN) - h)/2,
            w,
            h,
            NULL,
            NULL,
            hInstance,
            NULL
    );
    printf( "Main window created.\n" );
    printf( "Prepare to render main window.\n" );
    ShowWindow( hWnd, 10 );
    UpdateWindow( hWnd );
    while ( GetMessage( &amp;msg, NULL, 0, 0 ) )
    {
        TranslateMessage( &amp;msg );
        DispatchMessage( &amp;msg );
    }
    return msg.wParam;
}
//窗口过程定义
LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM IParam )
{
    HDC hdc;
    PAINTSTRUCT ps;
    RECT rect;
    static RealPlayInfo* info;
    switch ( message )
    {
        case WM_CREATE :
            NET_DVR_Init();
            NET_DVR_SetConnectTime( 2000, 1 );
            NET_DVR_SetReconnect( 10000, true );
            info = StartRealPlay( hwnd, "192.168.0.196" );
            return 0;
        case WM_DESTROY :
            PostQuitMessage( 0 );
            StopRealPlay( info );
            NET_DVR_Cleanup();
            return 0;
    }
    return DefWindowProc( hwnd, message, wParam, IParam );
}</pre> 
</div><p>The post <a rel="nofollow" href="https://blog.gmem.cc/hikvision-video-monitoring-development-with-mingw">基于MinGW的海康视频监控开发</a> appeared first on <a rel="nofollow" href="https://blog.gmem.cc">绿色记忆</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gmem.cc/hikvision-video-monitoring-development-with-mingw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows下基于Eclipse CDT的C/C++开发</title>
		<link>https://blog.gmem.cc/eclipse-cdt-based-dev</link>
		<comments>https://blog.gmem.cc/eclipse-cdt-based-dev#comments</comments>
		<pubDate>Thu, 20 Oct 2011 09:41:07 +0000</pubDate>
		<dc:creator><![CDATA[Alex]]></dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[CDT]]></category>
		<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[LLVM]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[MSVC]]></category>

		<guid isPermaLink="false">http://blog.gmem.cc/?p=2029</guid>
		<description><![CDATA[<p>安装和配置 安装Eclipse CDT 到Eclipse CDT官网下载：http://www.eclipse.org/cdt/并安装 Eclipse的相关配置可以参考：Eclipse 4.3.2开发环境搭建 安装工具链 下面的工具链可以根据工作环境进行选择性的安装。 MinGW 安装MinGW，下载地址：http://sourceforge.net/projects/mingw/files/ 安装MSYS，到http://sourceforge.net/projects/mingw/files/MSYS/下载 mingw-get-setup.exe，然后双击安装，选择安装目录为%MINGW_HOME%，勾选MSYS base，进行安装 将%MINGW_HOME%\bin添加到PATH环境变量，以便Eclipse CDT识别此工具链 MinGW-w64 安装MinGW-w64，下载地址：http://mingw-w64.org/doku.php 复制%MINGW_W64%\x86_64-w64-mingw32-gcc.exe（对于32位版本则是i686-w64-mingw32-gcc.exe）为mingw32-gcc.exe，便于Eclipse识别工具链 安装MSYS，下载地址：SourceForge 将%MINGW_W64%\mingw32\bin目录加入到PATH环境变量，以便Eclipse CDT识别此工具链 注意，Eclipse不能区分MinGW和MinGW-w64。因此，如果机器上同时安装这两套工具链，只应该设置其中常用的到环境变量PATH中。当需要使用另外一套工具链时，设置Eclipse项目属性 <a class="read-more" href="https://blog.gmem.cc/eclipse-cdt-based-dev">[...]</a></p>
<p>The post <a rel="nofollow" href="https://blog.gmem.cc/eclipse-cdt-based-dev">Windows下基于Eclipse CDT的C/C++开发</a> appeared first on <a rel="nofollow" href="https://blog.gmem.cc">绿色记忆</a>.</p>
]]></description>
				<content:encoded><![CDATA[<div class="wri_content_clear_both"><div class="blog_h1"><span class="graybg">安装和配置</span></div>
<div class="blog_h2"><span class="graybg">安装Eclipse CDT</span></div>
<ol>
<li>到Eclipse CDT官网下载：<a href="http://www.eclipse.org/cdt/">http://www.eclipse.org/cdt/</a>并安装</li>
<li>Eclipse的相关配置可以参考：<a href="/eclipse-kepler-sr2-setup#workspace-config">Eclipse 4.3.2开发环境搭建</a></li>
</ol>
<div class="blog_h2"><span class="graybg">安装工具链</span></div>
<p>下面的工具链可以根据工作环境进行选择性的安装。</p>
<div class="blog_h3"><span class="graybg">MinGW</span></div>
<ol>
<li>安装MinGW，下载地址：<a href="http://sourceforge.net/projects/mingw/files/">http://sourceforge.net/projects/mingw/files/</a></li>
<li>安装MSYS，到<a href="http://sourceforge.net/projects/mingw/files/MSYS/">http://sourceforge.net/projects/mingw/files/MSYS/</a>下载 mingw-get-setup.exe，然后双击安装，选择安装目录为%MINGW_HOME%，勾选MSYS base，进行安装</li>
<li>将%MINGW_HOME%\bin添加到PATH环境变量，以便Eclipse CDT识别此工具链</li>
</ol>
<div class="blog_h3"><span class="graybg">MinGW-w64</span></div>
<ol>
<li>安装MinGW-w64，下载地址：<a href="http://mingw-w64.org/doku.php">http://mingw-w64.org/doku.php</a></li>
<li>复制%MINGW_W64%\x86_64-w64-mingw32-gcc.exe（对于32位版本则是i686-w64-mingw32-gcc.exe）为mingw32-gcc.exe，便于Eclipse识别工具链</li>
<li>安装MSYS，下载地址：<a href="http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/">SourceForge</a></li>
<li>将%MINGW_W64%\mingw32\bin目录加入到PATH环境变量，以便Eclipse CDT识别此工具链</li>
</ol>
<p>注意，Eclipse不能区分MinGW和MinGW-w64。因此，如果机器上同时安装这两套工具链，只应该设置其中常用的到环境变量PATH中。当需要使用另外一套工具链时，设置Eclipse项目属性 - C/C++ Build - Environment，添加环境变量MINGW_HOME，并点选“Replace native environment with specified one”</p>
<div class="blog_h3"><span class="graybg">Cygwin</span></div>
<ol>
<li>安装Cygwin：<a href="http://cygwin.com/setup-x86.exe">http://cygwin.com/setup-x86.exe</a>，选择一个安装目录，例如（D:\CPP\tools\Cygwin\，以下称%CYGWIN_HOME%）</li>
<li>在Select Packages步骤下，选择Devel中的：autoconf、automake、binutils、gdb、gcc-core、gcc-g++、libtool、make，以及wget，下一步进行安装，其它需要的工具或者库，可以随时使用此安装程序安装</li>
<li>将 %CYGWIN_HOME%\bin、%CYGWIN_HOME%\usr\local\bin添加到PATH环境变量，以便Eclipse CDT识别此工具链</li>
<li>（可选步骤）为了后续安装软件包方便，可安装apt-cyg：<br />
<pre class="crayon-plain-tag">wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
chmod +x apt-cyg
mv apt-cyg /usr/local/bin/</pre>
</li>
</ol>
<div class="blog_h3"><span class="graybg">LLVM</span></div>
<p>本节假设已经安装了MinGW工具链+MSYS，并在其上搭建LLVM工具链，步骤如下：</p>
<ol>
<li>安装Eclipse对LLVM工具链的支持：添加Update Site：<a href="http://petrituononen.com/llvm4eclipsecdt/update">http://petrituononen.com/llvm4eclipsecdt/update</a> 并安装</li>
<li>进入MSYS终端，执行以下脚本，以构建LLVM：<br />
<pre class="crayon-plain-tag">#签出LLVM源码
cd /src
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd /src/llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd /src/llvm/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
#配置和构建
cd /src/llvm
./configure --prefix=/mingw32 --enable-optimized --disable-assertions 
make
make install</pre>
</li>
</ol>
<div class="blog_h3"><span class="graybg">MSVC</span></div>
<ol>
<li>安装Microsoft Visual Studio</li>
<li>Eclipse - Help - Install New Software，选择Eclipse CDT的Update Site，下一步中，在Optional中选择 C/C++ Visual C++ Support，进行安装</li>
</ol>
<div class="blog_h2"><span class="graybg">创建Eclipse C/C++工程</span></div>
<p>通过Eclipse - File - New - C/C++ Project即可创建C或者C++的工程，创建时需要选择工具链，某些工具链的需要额外的设置，具体如下：</p>
<div class="blog_h3"><span class="graybg">LLVM</span></div>
<ol>
<li>C/C++ General - Path and Symbols <br />Includes - GNU C++<br />
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="5">
<thead>
<tr>
<td style="text-align: center;">Debug</td>
</tr>
</thead>
<tbody>
<tr>
<td>%MinGW_HOME%\include<br />%MinGW_HOME%\lib\gcc\mingw32\4.8.1\include<br />%MinGW_HOME%\lib\gcc\mingw32\4.8.1\include\c++<br />%MinGW_HOME%\lib\gcc\mingw32\4.8.1\include\c++\mingw32</td>
</tr>
</tbody>
</table>
<p>Symbols - GNU C++</p>
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="5">
<thead>
<tr>
<td style="text-align: center;"> Debug</td>
<td style="text-align: center;">Release </td>
</tr>
</thead>
<tbody>
<tr>
<td> __MSVCRT__=1</td>
<td> __MSVCRT__=1</td>
</tr>
</tbody>
</table>
<p>Libraries - GNU C++</p>
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="5">
<thead>
<tr>
<td style="text-align: center;"> Debug</td>
<td style="text-align: center;">Release </td>
</tr>
</thead>
<tbody>
<tr>
<td>stdc++</td>
<td>stdc++</td>
</tr>
</tbody>
</table>
<p>Library Paths- GNU C++</p>
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="5">
<thead>
<tr>
<td style="text-align: center;"> Debug</td>
<td style="text-align: center;">Release </td>
</tr>
</thead>
<tbody>
<tr>
<td>%MinGW_HOME%\lib\gcc\mingw32\4.8.1</td>
<td>%MinGW_HOME%\lib\gcc\mingw32\4.8.1</td>
</tr>
</tbody>
</table>
</li>
<li>C/C++ Build - Settings <br /> Tool Settings - LLVM C++ Linker：Command改为clang</li>
<li>如果同时安装了Cygwin，可能需要把%Cygwin%下在环境变量PATH中条目移除；可能需要把MSYS相关的条目从PATH中移除</li>
</ol>
<div class="blog_h1"><span class="graybg">常见问题</span></div>
<div class="blog_h3"><span class="graybg">使用GCC时如何创建Windows窗体应用程序</span></div>
<p>设置链接标记，在Eclipse下：Properties - C/C++ Build -Settings - MinGW C++ Linker - Misc - Linker flags，添加<pre class="crayon-plain-tag">-mwindows</pre> ，即可提示链接器创建的是窗口应用，额外添加 -mconsole 则可同时获得一个控制台窗口。</p>
<div class="blog_h3"><span class="graybg">如何为应用程序添加资源文件</span></div>
<ol>
<li>Properties - C/C++ Build -Settings - Build Steps - Pre-build steps，添加调用windres的脚本，例子可以参考<a href="/wxwidgets-development-with-eclipse-cdt#prebuild-script-for-rc-file">《基于Eclipse CDT的wxWidgets开发环境搭建》</a></li>
<li>把上面编译好的*.o文件添加到Properties - C/C++ Build -Settings - MinGW C++ Linker - Misc - Other objects里</li>
</ol>
</div><p>The post <a rel="nofollow" href="https://blog.gmem.cc/eclipse-cdt-based-dev">Windows下基于Eclipse CDT的C/C++开发</a> appeared first on <a rel="nofollow" href="https://blog.gmem.cc">绿色记忆</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gmem.cc/eclipse-cdt-based-dev/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MinGW知识集锦</title>
		<link>https://blog.gmem.cc/mingw-faq</link>
		<comments>https://blog.gmem.cc/mingw-faq#comments</comments>
		<pubDate>Wed, 15 Jun 2011 09:53:12 +0000</pubDate>
		<dc:creator><![CDATA[Alex]]></dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[Porting]]></category>

		<guid isPermaLink="false">http://blog.gmem.cc/?p=3526</guid>
		<description><![CDATA[<p>基础知识 MinGW、MinGW-w64的区别 前者仅仅支持32位GCC（包括Host和Target）。后者原先是MinGW的分支，现在已经独立发展，同时支持32/64bit应用的构建，同时支持更多的Windows API。 MinGW-w64同时支持构建64位应用程序，它包含了 rubenvb、mingw-builds、tdm-gcc等不同的构建版本。在安装MinGW-w64时，你需要决定32/64位、线程库、异常处理机制等选项。其中除了sjlj以外的EH，不能同时支持32/64位应用程序的构建，32/64位版本的MinGW-w64默认分别构建32/64位应用程序。 MinGW有时候被称为mingw32，而32位的MinGW-w64则可以称为MinGW-w32。 常见问题 如何挂载目录 如果遇到/mingw目录不存在之类的问题，说明文件系统挂载表没有配置好。打开 [crayon-69d915d7390e4341309619-i/]，添加类似下面的文本： [crayon-69d915d7390e8527936025/] 重启MSYS命令行界面即可。  MSYS终端中文显示和输入 首先，如果使用mintty作为终端工具，进入Options ⇨ Text，把右侧窗格中的Locale和Character set设置为Default。 修改[crayon-69d915d7390ea788410307-i/] ，添加如下内容： [crayon-69d915d7390ec039067527/] 修改 [crayon-69d915d7390ef614558598-i/] 和[crayon-69d915d7390f1443584559-i/] 中如下两行： [crayon-69d915d7390f3598731355/] &#160;</p>
<p>The post <a rel="nofollow" href="https://blog.gmem.cc/mingw-faq">MinGW知识集锦</a> appeared first on <a rel="nofollow" href="https://blog.gmem.cc">绿色记忆</a>.</p>
]]></description>
				<content:encoded><![CDATA[<div class="wri_content_clear_both"><div class="blog_h2"><span class="graybg">基础知识</span></div>
<div class="blog_h3"><span class="graybg">MinGW、MinGW-w64的区别</span></div>
<p>前者仅仅支持32位GCC（包括Host和Target）。后者原先是MinGW的分支，现在已经独立发展，同时支持32/64bit应用的构建，同时支持更多的Windows API。</p>
<p>MinGW-w64同时支持构建64位应用程序，它包含了 rubenvb、mingw-builds、tdm-gcc等不同的构建版本。在安装MinGW-w64时，你需要决定<span style="background-color: #c0c0c0;">32/64位、线程库、异常处理机制等选项</span>。其中除了sjlj以外的EH，不能同时支持32/64位应用程序的构建，32/64位版本的MinGW-w64默认分别构建32/64位应用程序。</p>
<p>MinGW有时候被称为mingw32，而32位的MinGW-w64则可以称为MinGW-w32。</p>
<div class="blog_h2"><span class="graybg">常见问题</span></div>
<div class="blog_h3"><span class="graybg">如何挂载目录</span></div>
<p>如果遇到/mingw目录不存在之类的问题，说明文件系统挂载表没有配置好。打开 <pre class="crayon-plain-tag">%MINGW_HOME%\msys\1.0\etc\fstab</pre>，添加类似下面的文本：</p>
<pre class="crayon-plain-tag">d:/CPP/mingw		/mingw</pre>
<p>重启MSYS命令行界面即可。 </p>
<div class="blog_h3"><span class="graybg">MSYS终端中文显示和输入</span></div>
<p>首先，如果使用mintty作为终端工具，进入Options ⇨ Text，把右侧窗格中的Locale和Character set设置为Default。</p>
<p>修改<pre class="crayon-plain-tag">%MSYS_HOME%/etc/profile</pre> ，添加如下内容：</p>
<pre class="crayon-plain-tag">alias l='ls --show-control-chars --color=auto'
alias la='ls -aF --show-control-chars --color=auto'
alias ll='ls -alF --show-control-chars --color=auto'
alias ls='ls --show-control-chars --color=auto'
export LANG=en</pre>
<p>修改 <pre class="crayon-plain-tag">%MSYS_HOME%/etc/inputrc.default</pre> 和<pre class="crayon-plain-tag">~/.inputrc</pre> 中如下两行：</p>
<pre class="crayon-plain-tag">set output-meta on
set convert-meta off</pre>
<p>&nbsp;</p>
</div><p>The post <a rel="nofollow" href="https://blog.gmem.cc/mingw-faq">MinGW知识集锦</a> appeared first on <a rel="nofollow" href="https://blog.gmem.cc">绿色记忆</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gmem.cc/mingw-faq/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
