<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/category/c-cpp/feed</link><description>多元化原創文章，內容包羅萬象，有程式語言、網站應用、軟體介紹、硬體介紹、作業系統、旅行遊記、專題採訪、益智問題、文學創作，以及作者們的知識分享和作品分享。</description><language>zh-TW</language><lastBuildDate>Tue, 7 Apr 2026 19:49:17 +0000</lastBuildDate><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>在 Linux 作業系統上使用 musl libc 來編譯出靜態可攜的程式，擺脫對於 glibc 的依賴</title><link>https://magiclen.org/musl-libc</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-660x486.jpg 3x" alt="">
musl libc是C語言的一種標準函式庫，程式碼乾淨且高效，針對靜態連接(static linking)設計，適合被用來製作可攜的程式，且也很容易進行交叉編譯(cross compile)，編譯出運行在不同系統環境的程式。GCC(GNU Compiler Collection)是GNU的C/C++編譯器套裝，大部分的Linux發行版使用的C標準函式庫是glibc，其所提供的GCC預設也是基於gl...]]></description><category>研究分享</category><category>C &amp; C++</category><category>Linux</category><category>musl</category><category>GCC</category><guid>https://magiclen.org/musl-libc</guid><pubDate>Tue, 27 Sep 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何在C/C++程式語言中使用Rust的函式庫？</title><link>https://magiclen.org/c-rust-library</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2019/09/source-code-583537_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2019/09/source-code-583537_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2019/09/source-code-583537_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2019/09/source-code-583537_1920-660x486.jpg 3x" alt="">
本站先前有介紹過在Rust程式語言中使用C/C++的函式庫的方式，而在這篇文章中會來談談反過來的作法，也就是在C/C++程式語言中使用Rust的函式庫。]]></description><category>研究分享</category><category>C &amp; C++</category><category>Rust</category><category>C/C++</category><category>Rust</category><guid>https://magiclen.org/c-rust-library</guid><pubDate>Thu, 5 Sep 2019 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>在Windows安裝MSYS2，讓Windows也能使用GNU的軟體開發工具</title><link>https://magiclen.org/msys2</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2023/10/sshot-18-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2023/10/sshot-18-220x162.png 1x, https://magiclen.org/wp-content/uploads/2023/10/sshot-18-440x324.png 2x, https://magiclen.org/wp-content/uploads/2023/10/sshot-18-660x486.png 3x" alt="">
GNU是一個Unix-like的作業系統，經常與Linux核心搭配在一起(GNU/Linux即為一般我們所說的「Linux作業系統」)。有許多軟體開發的程式都是運作在GNU的環境中，無法直接在Windows作業系統中使用，就得依靠如Cygwin和MinGW(Minimalist GNU for Windows)等軟體在Windows作業系統中，建立出GNU程式的開發環境。嚴格來說，Cygwin和M...]]></description><category>軟體介紹</category><category>C &amp; C++</category><category>Linux</category><category>Windows</category><category>Linux</category><category>vim</category><category>Windows</category><category>MSYS2</category><category>MinGW</category><guid>https://magiclen.org/msys2</guid><pubDate>Fri, 14 Dec 2018 12:00:34 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何在Rust程式語言中使用C/C++的函式庫？</title><link>https://magiclen.org/rust-c-library</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt="">
作為新穎、先進的程式語言，Rust的函式庫還沒有C/C++語言的函式庫來得多且完整。在很多時候，我們還是無可避免地必須要去使用現有C/C++程式語言所實作的函式庫來完成我們需要的功能。雖然一般來說，我們還是會比較喜歡用純Rust程式碼來開發程式，確保程式的安全性以及可移植性，但畢竟要把過去每個C/C++程式語言所實作的函式庫，都使用Rust程式語言來改寫，是非常不切實際的事。在開發成本的考量之下，...]]></description><category>研究分享</category><category>C &amp; C++</category><category>Rust</category><category>C/C++</category><category>Rust</category><guid>https://magiclen.org/rust-c-library</guid><pubDate>Sat, 3 Nov 2018 20:00:47 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>Node.js也能用的StringBuilder</title><link>https://magiclen.org/node-stringbuilder</link><description><![CDATA[    <img src="https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-220x162.png 1x, https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-440x324.png 2x, https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-660x486.png 3x" alt="">
有學過Java的人應該會知道「StringBuilder」或是「StringBuffer」這兩個在「java.lang」套件下的類別，常被用來處理需要一直被改變內容的字串。由於Java程式語言一個字串(String)有著不可變物件(Immutable Object)的特性，如果直接使用String類別來進行字串的處理，在改變字串的過程中，每次字串內容的變化將會產生出新的String物件來表示，也導...]]></description><category>C &amp; C++</category><category>JavaScript</category><category>Boyer-Moore-MagicLen</category><category>C/C++</category><category>JavaScript</category><category>node.js</category><category>node-stringbuilder</category><category>Node-API</category><guid>https://magiclen.org/node-stringbuilder</guid><pubDate>Sun, 6 Aug 2017 02:18:27 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>