2013-06-23 92 views
0

我想編譯一個模塊與V8和節點。我將它配置爲dll並下載了源代碼並使用vcbuild.bat編譯了nodejs。編譯窗口中的V8模塊

但是,它會拋出這樣的錯誤

錯誤2錯誤LNK2028:未解決的令牌(0A0005F6) 「類V8 ::處理__cdecl V8 ::真(無效)」(真@ V8 @@ $$ FYA?AV?$ Handle @ VBoolean @ v8 @@@ 1 @ XZ)在函數「public:static class v8 :: Handle __cdecl v8 :: Boolean :: New(bool)」(?New @ Boolean @ v8 @@ $$ FSA?AV?$ @手柄@ VBoolean V8 @@@ 2 @ _N @ Z)

錯誤6錯誤LNK2 028:無法解析的令牌(0A0005FE)「public:class v8 :: Local __thiscall v8 :: Object :: GetPropertyNames(void)」 (?GetPropertyNames @ Object @ v8 @@ $$ FQAE?AV?$ Local @ VArray @ v8 @@@ 2 @ XZ) 在函數「class v8 :: Handle __cdecl strin(v8 :: Arguments const &)」中引用的「 (?strin @@ $$ FYA?AV?$ Handle @VValue @ v8 @ @@ V8 @@ ABVArguments @ 2 @@ Z)C:\用戶\阿伊莎\文檔\ Visual 工作室2012 \項目\ Project2的\ Project2的\ EventLog.obj事件日誌

什麼可以是錯誤的?似乎與對象有關HandleScope

回答

0

我已經在Windows(VS2010)上構建了帶有v8 dll的節點。我記錄了我所做的與大家分享的內容,也供我參考。這些包是今天git的新鮮克隆。

首先你建立v8作爲一個dll。我使用了本頁中建議的BitCortex方法。 Build googles v8 as shared library on windows?

然後

 
0) Suppose you are at the root of the source tree. 
1) edit vcbuild.bat (for a debug build) 
    Line 15 set config=Release -> set config=Debug 
    Line 18 set target_arch=ia32 -> set target_arch=x64 
     * target-arch should be the arch of your system. 
    Line 92 python configure %debug_arg% %nosnapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG% 
    -> python configure %debug_arg% %nosnapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG% --shared-v8 

2) cp $(v8-dll-build)/include/*h ./src 
3) cp $(v8-dll-build)/build/Debug/lib/v8.lib . 
4) Build 
    > vcbuild nosign 
5) cp $(v8-dll-build)/build/Debug/*.dll Debug 

這是所有有給它。

+0

我使用Gow bash終端複製文件,使它們看起來像unix命令。 vcbuild.bat在bash終端上不起作用。 – yoshi