タグ

2011年7月21日のブックマーク (3件)

  • How to use cmake

    Author: R. Koucha Last update: 03-Jan-2017 Back to main page Back to previous page Empirical approach to CMAKE Introduction Project 1: Generation of an executable Project 2: Generation of an executable linked to a library Project 3: Generation of an executable and a shared library with the same name Project 4: Generation and installation of a program along with its manuals Project 5: Installation

  • Android JNI で C++ を利用する

    Android JNIでって話だとC言語サンプルはNDKにも付いてくるのだけど、C++となると情報が結構少ないので、備忘録として記載。 基的に拡張子をcppにすることでコンパイルすることは出来ます。私のC++での開発経験はVisual C++(今はVisual Studioですよね)ではほとんど無い経験がありません。Borland Delphiを1.0から開発していたことが長かったので、C++はBorland C++ Builderだったのです。 #昨年はC++ Builderの講師の仕事もしていましたので・・・ 何故こんな話をしているかというと、C++でclass定義というと「.h」にはクラス定義のみで、コンストラクタやデストラクタ、各メソッドは「.cpp」ファイルに記述していました。 #というか、勝手にテンプレートでそのように作られるんですね。 兎も角、「.h」「.cpp」のソースフ

  • NDKでSTL + 例外 + RTTIを使ってみる - tmash06の日記

    NDKr5からSTLと例外とRTTI(実行時型情報)が使えるようになったということで、試してみました。 ソース #include <vector> #include <iostream> #include <stdexcept> #include <typeinfo> #include <cxxabi.h> using namespace std; int main(void) { vector<int> arr; int status; for(int i = 0; i < 5; i++) { arr.push_back( i ); } for(int i = 0; i < arr.size(); i++) { cout << arr[i] << endl; } try { arr.at(arr.size()); }catch(out_of_range& ex) { char* dema