跳到主要內容

發表文章

目前顯示的是有「Boost」標籤的文章

Wandbox -- 線上的 Compiler

Wandbox 是一個線上 Compiler,提供 C++, Javascript, Java 等主流語言線上編輯及編譯的功能,特別的是它也提供 Swift 語言、Boost 最新版本、支援 C++ 最新的標準,除此之外,還支援 Vim, Emacs 等編輯器,整個 Project 的原始程式碼 都存放在 GitHub ,如果有時間,可以嘗試下載來安裝看看。 在 Wandbox 中的 Wandbox-vim 作者 寫了 一些套件 ,其中 Shiba is a rich markdown previewer, Trendy is a GitHub Trending Repositories watcher & manager, 還有 Vim Plugins 是比較有興趣的專案。

Setting Boost library in Qt for Windows 64-bits

Qt 是一個很優質的 C++ IDE,在前些日子 Qt Project release Qt 5.1.1 for Windows 64-bit (VS 2012, OpenGL, 522 MB) 的版本,於是重新安裝了這個版本。但是自己卻忘記之前 compile Boost 是 msvc 32-bits 的版本(Boost 的 compile 設定可以參考之前寫的 Building Wt with Visual Studio 2012 on Windows 8 x64 PC 這篇文章),在使用 Boost Getting Started on Windows 的 Regex source code 做測試時,卻出現 error LNK2019 : unresolved external symbol 錯誤,參考了 stack overflow 的這篇文章 ,才知道用到 32-bits 的 regex Library ,整個修正的過程,紀錄在底下的文章,以後才不至於忘記。 Qt 5.1.1 for Windows 64-bit (VS 2012, OpenGL) 這個版本主要是使用 Visual Studio 2012 做為後端的 Compiler,然而安裝 VS 2012 Express for Desktop 可以使用 x64 or x86 的版本,所以安裝完  VS 2012 Express for Desktop 以後,再安裝 Qt 5.1.1 for Windows 64-bit (VS 2012, OpenGL) 就可以使用,並不需要做特別的設定。相同地,使用 Boost 也是一樣,只要不需要特別 link 到 Boost library 的程式,皆可以 compile 成功,並且可以執行。底下省略了安裝 VS 2012 及 Qt 的過程,並且使用之前 Boost 32-bits 的 library 來測試 Boost Getting Started on Windows 的 lambda 程式,整個過程為: 1. 在 Qt 中新增一個 Plain C++ Project:    File > New File or Project > Non-Qt Project >...

New website of BoostCon

BoostCon 的網站 主要是針對 Boost Conference 所做的網站,提供 Conference 的一些訊息,在這個 Conference 所討論的議題不僅包括 Boost Library 的內容,也涉及一些與 C++ 相關的議題,目前 BoostCon 網站已經改名為 C++now 網站 ,為何要改成 C++now 可以參考 網站中 About 的說明 。在 2013 年的 Conference 中有許多 speaker 討論了一些議題值得關注,Session 的 Slides 可以在 Github repository 中下載,整個 Video 可以到 YouTube 網站 中觀看,最佳 Session 的得主已經公佈在 這個網站中 。 ODB, an ORM for C++(11):軟體可以到 Code Synthesis 公司網站 下載 Survey of Multi-Threaded Programming Support in C++11 and Boost Live Coding with C++ and the LLVM JIT Engine

使用 Boost 相關 Library 的分析軟體

看到有人寫 Boost Dependency Analyzer 這種軟體,真是 cool !有了它,以後在使用 Boost Library 時,可以更清楚自己及所引用的 Library 的相依性,對於想要了解 Boost Library 內部的人也有相當大的幫助。 同時,在 ISO C++ 中連結了 HPX version 0.9.6 released 的消息,要寫平行處理及平行計算的開發者,是另一種不同的選擇。

Using Qt for Windows x64(VS 2012) with Boost Library

在 Qt 5.0 版本發行時,最早只有 Visual Studio 2010 的版本,後來分別發行 MinGW 4.7 以及 VS 2012 的版本,對於 Qt 這個 IDE 如何使用 Boost Library,設定的過程說明如下: Qt for MinGW compiler: 1. 下載 STL 所 compile 的 MinGW 套件 ,其中包含了 boost library 2. 開啟 Qt,然後建立一個 new project for c++ 3. 加入 Boost Library 的路徑: 在 .pro 的設定檔中加入下面的路徑 INCLUDEPATH += D:/libraries/ include LIBS += -LD:/libraries/lib/ -lboost_regex 4. 將 main.cpp 的內容改成 boost's Getting Started 的程式 : #include <boost/regex.hpp> #include <iostream> #include <string> int main() { std::string line; boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" ); while (std::cin) { std::getline(std::cin, line); boost::smatch matches; if (boost::regex_match(line, matches, pat)) std::cout << matches[2] << std::endl; } } 5. 測試: 輸入 "Subject: Hello Boost" ------------------------------------------------------------------------------- Qt for Visual Studio 2012 compiler: ...