我在編譯4.2.3的NodeJS的問題(即要求任何版本的Visual C++ 4.8及以上),我已經做了以下內容:編譯4+的NodeJS在CentOS 5
- 編譯gcc4.8(因爲GCC 4.4在默認情況下在CentOS 6
- 將CXX選項指向更新的編譯器
- 新增了通過LD_LIBRARY_PATH的MPC,GMP和MPFR圖書館,
但我仍然得到以下錯誤:
gtest-test-part.cc:(.text.startup._GLOBAL__sub_I__ZN7testing14TestPartResult14ExtractSummaryEPKc+0xa): undefined reference to
std::ios_base::Init::Init()' gtest-test-part.cc:(.text.startup._GLOBAL__sub_I__ZN7testing14TestPartResult14ExtractSummaryEPKc+0x1a): undefined reference to
std::ios_base::Init::~Init()' collect2: error: ld returned 1 exit status
所以,我看到下面的gcc undefined reference to `std::ios_base::Init::Init()',但我不知道要獲取該怎麼加,如果可能的話,或者我應該到庫添加到LD_LIBRARY_PATH? I also saw this, but I don't have root (legacy systems not part of our cloud) so I can't apply all the advice given.
通過源代碼編譯gcc4.8以獲取nodejs的正確方法是什麼?