2014-07-02 75 views
1

我得到下面的錯誤,而試圖在鏈接1.運行代碼,請幫助如何解決這個錯誤,同時運行V8的示例代碼JavaScript引擎

鏈接1:https://developers.google.com/v8/get_started#audience

- ---------------------------------- Error Starts -------------- ------------------------

amit-macbook:v8 amit.sood$ g++ -Iinclude hello_world.cpp -o hello_world -Wl,--start-group out/x64.release/obj.target/{tools/gyp/libv8_{base,libbase.x64,snapshot},third_party/icu/libicu{uc,i18n,data}}.a -Wl,--end-group -lrt 

clang: error: no such file or directory: 'out/x64.release/obj.target/tools/gyp/libv8_base.a' 

clang: error: no such file or directory: 'out/x64.release/obj.target/tools/gyp/libv8_libbase.x64.a' 

clang: error: no such file or directory: 'out/x64.release/obj.target/tools/gyp/libv8_snapshot.a' 

clang: error: no such file or directory: 'out/x64.release/obj.target/third_party/icu/libicuuc.a' 

clang: error: no such file or directory: 'out/x64.release/obj.target/third_party/icu/libicui18n.a' 

clang: error: no such file or directory: 'out/x64.release/obj.target/third_party/icu/libicudata.a' 

------------------- -----------------錯誤結束------------- -------------------------

我使用下面的鏈接2. V8安裝我安裝的是64位版本

鏈接2:https://code.google.com/p/v8/wiki/BuildingWithGYP

回答

1

我在這裏把一個指南在Mac OSX建設V8後,我有我的機器上用它的成功 - 讓我知道,如果這對你的作品,喜歡的反饋:https://gist.github.com/netpoetica/28ce31478cfc43edcaa7

此外,具體針對您的問題:這裏有幾種可能性。首先,確保你實際上有一個出/入目錄 - 在調用make後會出現這個目錄。接下來,當您撥打make時,您可能沒有真正創建一個名爲/ x64的文件夾。

make x64 // or make x64.release

0

你需要建立V8靜態: - 相反,你可以(可能)都呼籲make native也許make ia32 -j 2或類似的東西,如果你使用的製作像這樣的文件夾名稱x64.release應該只存在庫標誌設置爲True。這可以如下完成。

通過運行gn args out.gn/x64.release編輯默認構建配置。加入兩行配置:is_component_build =虛假和v8_static_library =真

這一步後,定期ninja -C out.gn/x64.release應該給你所需要的庫

來源:https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding#run-the-example