Windows環境下CodeBlocks匯入GNU Regex Library Regex

來源:互聯網
上載者:User

標籤:

標準的C/C++庫中不支援Regex,因此需要第三方的庫來支援。我使用的是GNU Regex Library。

Regex的語連結:https://msdn.microsoft.com/zh-cn/library/ae5bf541(VS.80).aspx。

以下是在CodeBlocks匯入步驟:

1. 開啟:http://gnuwin32.sourceforge.net/packages/regex.htm;

2. 在"Download"處選擇“Complete package, except sources”,點擊"Setup"下載;

3. 安裝下載名為"regex-2.7-setup"的安裝包,預設安裝位置是C:\Program Files (x86)\GnuWin32,之後無腦安裝,最後的目錄結構如下:;

4. 在安裝位置中的bin檔案夾下,如C:\Program Files (x86)\GnuWin32\bin,將regex2.dll複製到需要使用Regex的工程的根目錄下,如所示:;

5. 開啟CodeBlocks工程,在“Project”中選擇"Build options...";

6. 在“Linker settings”標籤下,點擊“add”將前面安裝的GnuWin32中lib檔案下的“regex.lib”添加到“Link libraries:”;

7. 在"Search directiories"標籤下的"Compiler"下點擊"Add"將GnuWin32中include檔案夾添加進去;

8. 在"Search directiories"標籤下的"Linker"下點擊"Add"將GnuWin32中lib檔案夾添加進去;

9. 點“OK”,匯入完畢。

Windows環境下CodeBlocks匯入GNU Regex Library Regex

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.