OK, getting very close now.

Most of those errors were because I was still passing the compiler command
option to use a shared V8 library even though I built a static one.
Removing that now leaves the following unresolved references, all from the
problematic platform-win32.cc:


g++ -LD:\MSYS\1.0\home\Qu0ll\V8\trunk -LD:\MinGW\lib -ov8-hello-world.exe
Source\helloWorld.o -lv8

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal4Time16SetToCurrentTimeEv+0x2d):
undefined reference to `_timegett...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal4Time16SetToCurrentTimeEv+0x78):
undefined reference to `_timegett...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal2OS17TimeCurrentMillisEv+0x39):
undefined reference to `_timegett...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal2OS17TimeCurrentMillisEv+0x8c):
undefined reference to `_timegett...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal2OS5SetupEv+0x39):
undefined reference to `_timegett...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal2OS5SetupEv+0x8c):
more undefined references to `_timegett...@0' follow

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket4BindEi+0x52):
undefined reference to `_ht...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket4BindEi+0x66):
undefined reference to `_ht...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket4BindEi+0x85):
undefined reference to `_b...@12'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZNK2v88internal11Win32Socket6ListenEi+0x2f):
undefined reference to `_lis...@8'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZNK2v88internal11Win32Socket6AcceptEv+0x29):
undefined reference to `_acc...@12'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket7ConnectEPKcS3_+0x7f):
undefined reference to `_getaddri...@16'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket7ConnectEPKcS3_+0xa5):
undefined reference to `_conn...@12'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket7ConnectEPKcS3_+0xb6):
undefined reference to `_freeaddri...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket8ShutdownEv+0x40):
undefined reference to `_shutd...@8'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket8ShutdownEv+0x50):
undefined reference to `_closesoc...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32SocketD0Ev[v8::internal::Win32Socket::~Win32Socket()]+0x40):
undefined reference to `_shutd...@8'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32SocketD0Ev[v8::internal::Win32Socket::~Win32Socket()]+0x4e):
undefined reference to `_closesoc...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32SocketD1Ev[v8::internal::Win32Socket::~Win32Socket()]+0x36):
undefined reference to `_shutd...@8'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32SocketD1Ev[v8::internal::Win32Socket::~Win32Socket()]+0x44):
undefined reference to `_closesoc...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZNK2v88internal11Win32Socket4SendEPKci+0x24):
undefined reference to `_s...@16'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZNK2v88internal11Win32Socket7ReceiveEPci+0x24):
undefined reference to `_r...@16'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal11Win32Socket15SetReuseAddressEb+0x3f):
undefined reference to `_setsock...@20'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket9LastErrorEv+0x1):
undefined reference to `_wsagetlaster...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket5SetupEv+0x17):
undefined reference to `_wsastar...@8'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket5SetupEv+0x34):
undefined reference to `_wsagetlaster...@0'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket4HToNEt+0xc):
undefined reference to `_ht...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket4NToHEt+0xc):
undefined reference to `_nt...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket4HToNEj+0xb):
undefined reference to `_ht...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal6Socket4NToHEj+0xb):
undefined reference to `_nt...@4'

D:\MSYS\1.0\home\Qu0ll\V8\trunk/libv8.a(platform-win32.o):platform-win32.cc:(.text$_ZN2v88internal2OS12CreateSocketEv+0x32):
undefined reference to `_soc...@12'
Again, it looks like I am missing a library or perhaps a link command
option.

Any ideas anyone?

Thanks,

-Qu0ll

On Wed, Apr 22, 2009 at 9:07 PM, 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