1
我读了V8 hello world示例,并按照文档中的步骤成功构建v8。v8 hello world示例链接错误
但是,当我编译示例代码,链接错误发生。这里是我的电脑详细信息和错误提示。
- OS的Ubuntu 13.10 AMD64
- GCC(Ubuntu的/ Linaro的4.8.1-10ubuntu9)4.8.1
- 编译命令:
g++ -Iinclude hello_world.cc -o hello_world -Wl,--start-group out/native/obj.target/{tools/gyp/libv8_{base.x64,snapshot},third_party/icu/libicu{uc,i18n,data}}.a -Wl,--end-group -lrt
错误提示
/usr/bin/ld: /home/leon/Documents/v8/v8/out/native/obj.target/v8_base.x64/src/platform/mutex.o: undefined reference to symbol '[email protected]@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
它炒菜。谢谢 – tinyproxy
对于那些被链接器错误困惑的人,“DSO”代表动态共享对象。 – Garrett