The warning LNK4098 indicate that you are trying to mix different version of the run-time libraries. Make sure that you have the same setting of "Configuration Properties->C/C++->Code Generation->Runtime Library" across all projects within any given configuration.
Regards, Søren On Wed, Apr 28, 2010 at 14:01, Timothy Sassone <[email protected]>wrote: > That did it, thank you very much! Just had to link with ws2_32.lib and > winmm.lib. > > It compiles, and it runs. The Hello World program is about 2MB when > compiled in debug mode, and about 1.5MB in release mode. Does that sound > about right? It seems to be taking a while to compile, but I guess that's > to be expected, if it compiles to be 1-2MB. > > Also, while it doesn't prevent it from compiling, I get the following > compiler warning: > 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other > libs; use /NODEFAULTLIB:library > > It works just fine as it is, but any idea what's causing this one? I tried > turning on /NODEFAULTLIB:library in the project options, but it caused > numerous missing symbol compile errors. > > Thanks again! > Timothy Sassone > > > 2010/4/28 Søren Gjesse <[email protected]> > >> All these missing symbols are Winsock2 functions. Please ensure that your >> project link with ws2_32.lib. >> >> Regarding the isinf, isnan and isfinite functions these are implemented in >> platform-win32.cc. These are behing an #ifdef _MSC_VER, which according to >> http://msdn.microsoft.com/en-us/library/b0084kay.aspx should also be >> defined for Visual Studio 2010. >> >> Regards, >> Søren >> >> On Mon, Apr 26, 2010 at 23:58, Timothy Sassone >> <[email protected]>wrote: >> >>> Added the #define directive, and it fixed the original problem. >>> Unfortunately, it claimed that isinf, isnan and isfinite hadn't been >>> defined. Some quick googling revealed that MSVC has similar functions >>> (_ininf, _isnan and _finite), so I added: >>> #define isinf(a) (_isinf(a)) >>> #define isnan(a) (_isnan(a)) >>> #define isfinite(a) (_finite(a)) >>> >>> That resolved that problem, but now I get 19 linker errors, if I have any >>> v8 functions in the main() function. >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__acc...@12 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__lis...@8 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__s...@16 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__closesoc...@4 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__freeaddri...@4 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__timegett...@0 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__soc...@12 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__b...@12 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__r...@16 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__setsock...@20 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__shutd...@8 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__nt...@4 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__ht...@4 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__wsagetlaster...@0 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__getaddri...@16 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__ht...@4 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__nt...@4 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__wsastar...@8 >>> 1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol >>> __imp__conn...@12 >>> >>> >>> Any ideas? >>> >>> Thanks again! >>> >>> >>> 2010/4/26 Søren Gjesse <[email protected]> >>> >>>> Looks as if the target architecture is not defined. Unless running >>>> with the ARM or MIPS simulator the host and target architectures should be >>>> the same. It should be defined in the SConstruct file and passed to the C++ >>>> compiler through a /D option. Can you see whether the cl command line has >>>> this option? >>>> >>>> You can try to add >>>> >>>> #define V8_TARGET_ARCH_IA32 >>>> >>>> to globals.h before the #ifdef checking it. >>>> >>>> Regards, >>>> Søren >>>> >>>> On Fri, Apr 23, 2010 at 20:35, Timothy-S <[email protected]>wrote: >>>> >>>>> Made a test program, to test which of the ifdefs were being >>>>> triggered. This is the one that is triggered: >>>>> #elif defined(_M_IX86) || defined(__i386__) >>>>> #define V8_HOST_ARCH_IA32 1 >>>>> #define V8_HOST_ARCH_32_BIT 1 >>>>> #define V8_HOST_CAN_READ_UNALIGNED 1 >>>>> >>>>> None of the following are triggered, before the error is triggered: >>>>> #if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_IA32) >>>>> #elif V8_TARGET_ARCH_ARM >>>>> #elif V8_TARGET_ARCH_MIPS >>>>> >>>>> On Apr 23, 11:16 am, Timothy-S <[email protected]> wrote: >>>>> > Ran the batch file. v8 compiles, but I still get the "#error" >>>>> > message. Same when compiling with: >>>>> > scons env="PATH:%PATH%,INCLUDE:%INCLUDE%,LIB:%LIB%" arch=ia32 >>>>> > >>>>> > On Apr 23, 11:04 am, Timothy-S <[email protected]> wrote: >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > > Here's the results of the "set": >>>>> > > ALLUSERSPROFILE=C:\Documents and Settings\All Users >>>>> > > APPDATA=C:\Documents and Settings\Halbarad\Application Data >>>>> > > CLIENTNAME=Console >>>>> > > CommonProgramFiles=C:\Program Files\Common Files >>>>> > > COMPUTERNAME=ELROHIR >>>>> > > ComSpec=C:\WINDOWS\system32\cmd.exe >>>>> > > FP_NO_HOST_CHECK=NO >>>>> > > GETMODEL=Satellite P100 >>>>> > > HOMEDRIVE=C: >>>>> > > HOMEPATH=\Documents and Settings\Halbarad >>>>> > > LOGONSERVER=\\ELROHIR >>>>> > > NUMBER_OF_PROCESSORS=2 >>>>> > > OS=Windows_NT >>>>> > > Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c: >>>>> > > \Program Files\Mi >>>>> > > crosoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL >>>>> > > Server\100\DTS >>>>> > > \Binn\;C:\Program Files\doxygen\bin;C:\Program >>>>> Files\TortoiseSVN\bin >>>>> > > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH >>>>> > > PROCESSOR_ARCHITECTURE=x86 >>>>> > > PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel >>>>> > > PROCESSOR_LEVEL=6 >>>>> > > PROCESSOR_REVISION=0f06 >>>>> > > ProgramFiles=C:\Program Files >>>>> > > PROMPT=$P$G >>>>> > > SESSIONNAME=Console >>>>> > > SystemDrive=C: >>>>> > > SystemRoot=C:\WINDOWS >>>>> > > TEMP=C:\DOCUME~1\Halbarad\LOCALS~1\Temp >>>>> > > TMP=C:\DOCUME~1\Halbarad\LOCALS~1\Temp >>>>> > > USERDOMAIN=ELROHIR >>>>> > > USERNAME=Halbarad >>>>> > > USERPROFILE=C:\Documents and Settings\Halbarad >>>>> > > VERNUM=PSPA6U-02K0128 >>>>> > > VS100COMNTOOLS=C:\Program Files\Microsoft Visual Studio >>>>> > > 10.0\Common7\Tools\ >>>>> > > windir=C:\WINDOWS >>>>> > >>>>> > > The CPU is an Intel Core 2, T7200 @ 2.00GHz. 2.01GHz with 2GB of >>>>> RAM. >>>>> > >>>>> > > I'll try the other two build methods ASAP. >>>>> > >>>>> > > Thank you for your time, >>>>> > > Timothy Sassone >>>>> > >>>>> > > On Apr 23, 10:52 am, Rico Wind <[email protected]> wrote: >>>>> > >>>>> > > > Hi Timothy, >>>>> > >>>>> > > > What CPU is your computer running? Plus, could you do a "set" in >>>>> the >>>>> > > > cmd window and post the output (to let us see your environment). >>>>> > >>>>> > > > Also, as you are using the express version it should not (at >>>>> least >>>>> > > > this is true for the 2008 version) be necessary to give the path >>>>> as >>>>> > > > argument to scons - see: >>>>> http://code.google.com/p/v8/wiki/BuildingOnWindows >>>>> > > > for details on the parameters you need to set. >>>>> > >>>>> > > > I am not sure, but if you can run vcvarsall.bat (see the page >>>>> above) >>>>> > > > you might just be able to do a: >>>>> > > > scons env="PATH:%PATH%,INCLUDE:%INCLUDE%,LIB:%LIB%" >>>>> > >>>>> > > > Alternatively, try passing arch=ia32 to scons (meaning build to >>>>> 32 bit >>>>> > > > intel architecture - but this is standard and as such should not >>>>> be >>>>> > > > necessary to set) >>>>> > >>>>> > > > Cheers, >>>>> > > > Rico >>>>> > >>>>> > > > On Fri, Apr 23, 2010 at 7:23 PM, Timothy-S < >>>>> [email protected]> wrote: >>>>> > > > > Running Windows XP Pro, 32bit, SP3. A quick google search >>>>> showed that >>>>> > > > > this question has been asked before, but the asker solved the >>>>> question >>>>> > > > > and never posted how. It was mentioned that the CPU >>>>> architecture is >>>>> > > > > the problem, but I don't think that's too likely, since I can >>>>> run >>>>> > > > > programs that use v8 (namely, Google Chrome...). There's a >>>>> decent >>>>> > > > > chance I screwed something up when building V8. I use MSVC++ >>>>> Express, >>>>> > > > > 2010, and so had to kinda wing it with the paths and such. I >>>>> have >>>>> > > > > less than a year of programming experience, so it's not >>>>> unlikely that >>>>> > > > > I screwed something up. >>>>> > >>>>> > > > > The error I'm getting: "c:\documents and settings\MyUsername\my >>>>> > > > > documents\visual studio 2010\projects\v8\src\globals.h(61): >>>>> fatal >>>>> > > > > error C1189: #error : Your target architecture is not >>>>> supported by >>>>> > > > > v8" >>>>> > >>>>> > > > > And here's the command-prompt commands I used to build V8, in >>>>> case >>>>> > > > > that's where I messed up: >>>>> > > > > set PATH=C:\Python26;C:\Python26\Scripts;%PATH% >>>>> > >>>>> > > > > scons env="PATH:C:\Program Files\Microsoft Visual Studio >>>>> 10.0\VC\bin;C: >>>>> > > > > \Program Files\Microsoft Visual Studio >>>>> 10.0\Common7\IDE;C:\Program >>>>> > > > > Files\Microsoft Visual Studio >>>>> 10.0\Common7\Tools,INCLUDE:C:\Program >>>>> > > > > Files\Microsoft Visual Studio 10.0\VC\include;C:\Program Files >>>>> > > > > \Microsoft SDKs\Windows\v7.0A\Include,LIB:C:\Program >>>>> Files\Microsoft >>>>> > > > > Visual Studio 10.0\VC\lib;C:\Program Files\Microsoft >>>>> SDKs\Windows\v7.0A >>>>> > > > > \Lib" >>>>> > >>>>> > > > > The code in the project I'm trying to compile is a perfect >>>>> copy-paste >>>>> > > > > of the second (somewhat longer) hello_world example from the >>>>> "Getting >>>>> > > > > Started" wiki page. >>>>> > >>>>> > > > > Thank you for your time, and help is very much appreciated! >>>>> > >>>>> > > > > Timothy Sassone >>>>> > >>>>> > > > > -- >>>>> > > > > v8-users mailing list >>>>> > > > > [email protected] >>>>> > > > >http://groups.google.com/group/v8-users >>>>> > >>>>> > > > -- >>>>> > > > v8-users mailing list >>>>> > > > [email protected]http://groups.google.com/group/v8-users >>>>> > >>>>> > > -- >>>>> > > v8-users mailing list >>>>> > > [email protected]http://groups.google.com/group/v8-users >>>>> > >>>>> > -- >>>>> > v8-users mailing list >>>>> > [email protected]http://groups.google.com/group/v8-users >>>>> >>>>> -- >>>>> v8-users mailing list >>>>> [email protected] >>>>> http://groups.google.com/group/v8-users >>>>> >>>> >>>> -- >>>> v8-users mailing list >>>> [email protected] >>>> http://groups.google.com/group/v8-users >>>> >>> >>> -- >>> v8-users mailing list >>> [email protected] >>> http://groups.google.com/group/v8-users >>> >> >> -- >> v8-users mailing list >> [email protected] >> http://groups.google.com/group/v8-users >> > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
