tojocky / node-pdfium

Native PDFium ported for node, iojs and nwjs
BSD 2-Clause "Simplified" License
73 stars 27 forks source link

Building X86 on Windows 7 X64 #6

Open Janhouse opened 9 years ago

Janhouse commented 9 years ago

Basically I got warnings messages "warning LNK4068: /MACHINE not specified" that made it default to X64 and thus error and failed compilation. I fixed it by quickly modifying generated pdfium.vcxproj and adding /MACHINE:X86 by hand to

<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   <ClCompile>
      <AdditionalOptions>/MACHINE:X86 /MP %(AdditionalOptions)</AdditionalOptions>

and to

<Lib>
      <AdditionalOptions>/MACHINE:X86 /LTCG %(AdditionalOptions)</AdditionalOptions>

It should instead probably be done in pdfium.gyp, so if you want to, you can fix it. :)

tojocky commented 9 years ago

ups... actually this seems to be an issue of node-gyp. on what OS did you compile? with what node-gyp version? I think you should specify specific parameters if your os is 64 but want on x32

Janhouse commented 9 years ago

Thanks for quick response!

Well, actually I did npm install --arch=ia32 --msvs_version=2013 and then nw-gyp rebuild --arch=ia32 --target=0.12.3 --msvs_version=2013 so it should have set the /MACHINE:X86 in pdfium.gyp but it didn't.