These link errors looks as if the libv8.lib does not contain what is
expected. I get the same kind of errors when compiling without linking with
libv8.lib

  g++ -Iinclude -L. -ohello-world.exe hello-world.cc

with the link errors showing C++ names not mangled names though.

Putting hello-world.cc in the v8 directory, building libv8.lib using scons
and running

  g++ -Iinclude -L. -ohello-world.exe hello-world.cc -lv8 -lws2_32 -lwinmm
results in a running hello-world.exe. Note the additional libraries ws2_32
and winmm.

Regards,
Søren

On Wed, Apr 22, 2009 at 13:07, Qu0ll <[email protected]> wrote:

> Ah, making a lot of progress now.
>
> I managed to get around that compile issue by removing a check in
> ws2tcpip.h for the version of WINNT as it didn't include the required
> definitions and I think this is a Vista issue.  Anyway, everything builds
> now but I get the following bizarre link errors:
>
>
> g++ -LD:\MSYS\1.0\home\Qu0ll\V8\trunk -ov8-hello-world.exe
> Source\helloWorld.o -lv8
>
> Source\helloWorld.o: In function `_ZNK2v86HandleINS_7ContextEEdeEv':
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v811HandleScopeC1Ev'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v87Context3NewEPNS_22ExtensionConfigurationENS_6HandleINS_14ObjectTemplateEEENS3_INS_5ValueEEE'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v86String3NewEPKci'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v86Script7CompileENS_6HandleINS_6StringEEEPNS_12ScriptOriginEPNS_10ScriptDataE'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v86Script3RunEv'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v86String10AsciiValueC1ENS_6HandleINS_5ValueEEE'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v86String10AsciiValueD1Ev'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v811HandleScopeD1Ev'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v86String10AsciiValueD1Ev'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v811HandleScopeD1Ev'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v87Context4ExitEv'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v87Context5EnterEv'
>
> D:/SVN/V8/trunk/include/v8.h:2432: undefined reference to
> `__imp___ZN2v82V813DisposeGlobalEPPv'
> It looks like it needs another library or perhaps some link command option.
>
> Any ideas?
>
> 2009/4/22 Søren Gjesse <[email protected]>
>
>> It looks as if the include file ws2tcpip.h is not read correctly when
>> compiling platform-win32.cc - ws2tcpip.h declares getaddrinfo and
>> freeaddrinfo.
>> Regards,
>> Søren
>>
>>
>> On Wed, Apr 22, 2009 at 11:26, Qu0ll <[email protected]> wrote:
>>
>>> 2009/4/22 Søren Gjesse <[email protected]>
>>>
>>>> Copying my response from another thread.
>>>> The reason for this behavior is most likely caused by both Microsoft
>>>> Visual Studio and MinGW being installed. The current SCons setup for V8
>>>> depends on the SCons autodetecting the toolchain, where MSVC is preferred
>>>> over MinGW. You could try patching SConstruct and src/SConscript files
>>>> adding tools = ['mingw'] to Environment() calls (Environment(tools =
>>>> ['mingw'])).
>>>> On a Windows installation with only MinGW installed V8 SCons build does
>>>> not cause problems.
>>>>
>>>>
>>>
>>>  OK thanks, much progress has been made now.   I have tried that but
>>> this is the result when I run scons after successfully compiling most of the
>>> modules:
>>>
>>> g++ -o obj\release\platform-win32.o -c -Wall -Werror -W
>>> -Wno-unused-parameter -pedantic -Wno-long-long -O3 -fomit-frame-pointer
>>> -fdata-sections -ffunction-sections -DWIN32 -fno-rtti -fno-exceptions
>>> -DWIN32 -Wall -Werror -W -Wno-unused-parameter -pedantic -Wno-long-long -O3
>>> -fomit-frame-pointer -fdata-sections -ffunction-sections -DWIN32
>>> -DENABLE_LOGGING_AND_PROFILING src\platform-win32.cc
>>> src\platform-win32.cc: In member function `virtual bool
>>> v8::internal::Win32Socket::Connect(const char*, const char*)':
>>> src\platform-win32.cc:1653: error: `getaddrinfo' was not declared in this
>>> scope
>>> src\platform-win32.cc:1660: error: `freeaddrinfo' was not declared in
>>> this scope
>>> src\platform-win32.cc:1653: warning: unused variable 'getaddrinfo'
>>> src\platform-win32.cc:1660: warning: unused variable 'freeaddrinfo'
>>> scons: *** [obj\release\platform-win32.o] Error 1
>>> scons: building terminated because of errors.
>>>
>>> Any ideas how to resolve this one?
>>>
>>> -Qu0ll
>>>
>>>
>>>
>>   >>
>>

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to