关于V8编译的HELLO_WORLD.cpp编译不过的问题

hotkarriver 2011-06-20 03:46:29
昨天去谷歌官网download了个V8的源码,按教程编了下
scons mode=debug library=shared snapshot=on
scons sample=shell
scons d8
木有问题,然后,把它的例子代码hello_world也copy下来编了一下
g++ -Iinclude hello_world.cpp -o hello_world libv8.a -lpthread

果断出错,编的机器都要哭了,还是没编过。。。求高人指点,本人64位UBUNTU系统。

错误提示如下例:

libv8.a(platform-linux.o): In function `v8::internal::OS::MemoryMappedFile::open(char const*)':
platform-linux.cc:(.text._ZN2v88internal2OS16MemoryMappedFile4openEPKc+0x8b): undefined reference to `operator new(unsigned int)'
libv8.a(platform-linux.o): In function `global constructors keyed to _ZN2v88internal7ceilingEd':
platform-linux.cc:(.text._GLOBAL__I__ZN2v88internal7ceilingEd+0x17): undefined reference to `operator new(unsigned int)'
libv8.a(platform-linux.o): In function `v8::internal::OS::Setup()':
platform-linux.cc:(.text._ZN2v88internal2OS5SetupEv+0x4c): undefined reference to `operator new(unsigned int)'
libv8.a(platform-linux.o): In function `v8::internal::Sampler::Start()':
platform-linux.cc:(.text._ZN2v88internal7Sampler5StartEv+0x7b): undefined reference to `operator new(unsigned int)'
libv8.a(platform-posix.o):platform-posix.cc:(.text._ZN2v88internal2OS12CreateSocketEv+0xc): more undefined references to `operator new(unsigned int)' follow
libv8.a(preparse-data.o): In function `v8::internal::CompleteParserRecorder::CompleteParserRecorder()':
preparse-data.cc:(.text._ZN2v88internal22CompleteParserRecorderC2Ev+0x4e): undefined reference to `operator new[](unsigned int)'
preparse-data.cc:(.text._ZN2v88internal22CompleteParserRecorderC2Ev+0xdf): undefined reference to `operator new[](unsigned int)'
preparse-data.cc:(.text._ZN2v88internal22CompleteParserRecorderC2Ev+0x138): undefined reference to `operator new[](unsigned int)'
preparse-data.cc:(.text._ZN2v88internal22CompleteParserRecorderC2Ev+0x1a6): undefined reference to `operator new[](unsigned int)'
libv8.a(preparse-data.o): In function `v8::internal::FunctionLoggingParserRecorder::FunctionLoggingParserRecorder()':
preparse-data.cc:(.text._ZN2v88internal29FunctionLoggingParserRecorderC1Ev+0x4e): undefined reference to `operator new[](unsigned int)'


字数有限制,就复制这么多吧,其实一屏的错误拉不完。。。
...全文
181 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
akwang1 2012-10-30
  • 打赏
  • 举报
回复
那不是每次都要加?有什么办法能一下子就搞完的?[Quote=引用 5 楼 的回复:]

我也终于都调通了。。。
scons时要加个arch=x64参数
链接时要加-lstdc++把c++标准库链进来
[/Quote]
changchanghust 2011-09-30
  • 打赏
  • 举报
回复
我也终于都调通了。。。
scons时要加个arch=x64参数
链接时要加-lstdc++把c++标准库链进来
changchanghust 2011-09-30
  • 打赏
  • 举报
回复
我也遇到了类似的问题,也是64为ubuntu。楼主的问题是怎么解决的?
IcyFox 2011-06-22
  • 打赏
  • 举报
回复
顶一个。。。
hotkarriver 2011-06-22
  • 打赏
  • 举报
回复
汗~~是不是哥发错讨论版了。。。一个回答都没有~~~~~~
算了,问题解决了,准备结贴了,来个顶的散分了
hotkarriver 2011-06-21
  • 打赏
  • 举报
回复

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧