私は現在JavaScriptに取り組んでおり、JavaScriptの単体テストを設計したいと考えています。google-JS-Testを使用しています。
http://code.google.com/p/google-js-test/
gjstest-1.0.7をダウンロードしました
必要なすべての前提条件をインストールしました。
http://code.google.com/p/google-js-test/wiki/Installing#Prerequisites
しかし、私がグーグルjsテストをインストールするとき
$ cd gjstest-1.0.7
$ make
次のエラーが発生しました
g++ -DHASH_NAMESPACE=__gnu_cxx -lrt -I. -I/usr/include/libxml2 -DDEFAULT_DATA_DIR=/usr/local/share/gjstest -c -o gjstest/internal/cpp/v8_utils.o gjstest/internal/cpp/v8_utils.cc
gjstest/internal/cpp/v8_utils.cc:33: error: ‘v8::StackFrame’ has not been declared
gjstest/internal/cpp/v8_utils.cc:34: error: ‘v8::StackTrace’ has not been declared
gjstest/internal/cpp/v8_utils.cc: In function ‘void gjstest::ConvertToStringVector(const v8::Handle<v8::Value>&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)’:
gjstest/internal/cpp/v8_utils.cc:60: error: no matching function for call to ‘v8::Array::Get(uint32&)’
/usr/include/v8.h:1161: note: candidates are: v8::Local<v8::Value> v8::Object::Get(v8::Handle<v8::Value>)
make: *** [gjstest/internal/cpp/v8_utils.o] Error 1
v8が正しくインストールされていないようです
次のようなコマンドを使用してV8をインストールしました
sudo apt-get install libv8-2.0.3
sudo apt-get install libv8-dbg
sudo apt-get install libv8-dev
そしてまたそれをダウンロードすることによって
svn checkout http://v8.googlecode.com/svn/trunk/ v8
cd v8
make dependencies
scons
しかし、それでもこれらのエラーが発生します
したがって、誰かがGoogle Jsをインストールして使用したり、v8をインストールしたりした場合は、この問題を解決する方法を教えてください。
Ubuntu10.04を使用しています。どんな助けでもありがたいです。