jackxiao / jslibs

Automatically exported from code.google.com/p/jslibs
0 stars 0 forks source link

Compiling issues using VS2010 on Windowss 8 #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to build jslibs (jsio in particular) on Windows 8 using VS2010. The 
steps I followed to do this were:

1. Opened the .sln files in VS2010 & converted them to VS2010 format (.vcxproj 
files were created in the process).
2. Changed build.sh to use msbuild.exe instead of vcbuild.exe.
3. Changed/removed some flags like nohtmllog & nologo, as I couldn't find 
equivalent flags for msbuild. Build command in .sh file now reads - msbuild.exe 
//M:$NUMBER_OF_PROCESSORS //p:useenv=true $VCBUILD_OPT $(basename $slnFile) 
//p:Configuration="$BUILD" //p:Platform="WIN32" >> $LOGFILE 2>&1

This creates mozjs.dll & nspr.dll but fails to build any of the jslibs 
projects. Attaching the build log.

Original issue reported on code.google.com by rawat.an...@gmail.com on 4 Feb 2013 at 6:25

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by sou...@gmail.com on 4 Feb 2013 at 1:15

GoogleCodeExporter commented 9 years ago
In jslibs\src\common\jlplatform.h, can you try to replace definition of:

INT8_MIN
INT16_MIN
INT32_MIN
INT8_MAX
INT16_MAX
INT32_MAX
UINT8_MAX
UINT16_MAX
UINT32_MAX
PTRDIFF_MIN
PTRDIFF_MAX
INT64_MIN
INT64_MAX
UINT64_MAX

by a single #include <stdint.h> (Note that VC9 do not have the file stdint.h)

Original comment by sou...@gmail.com on 7 Feb 2013 at 12:46

GoogleCodeExporter commented 9 years ago
Thanks for the tip. I made the following change in 
jslibs-src\libs\js\src\mfbt\stdint.h

#if defined(MOZ_CUSTOM_STDINT_H)
#  include MOZ_CUSTOM_STDINT_H
#elif defined(_MSC_VER) && _MSC_VER <= 1600 //version check changed to include 
version upto 1600
#  include "mozilla/MSStdInt.h"
#else
#  include <stdint.h>
#endif

This way standard stdint.h is not included. I tried what you suggested but it 
was leading to other similar errors. This seems easier to do.

Thanks.

Original comment by rawat.an...@gmail.com on 13 Feb 2013 at 5:43