I am currently trying to connect c++ with nodejs project using node-gyp. My current problem is that i have a 32 bit library file and a 64 bit library file. My computer is using 64 bit. If i used the 32 bit library files, and build it with node-gyp rebuild, it will have errors of unresolved external symbol when Im using the functions of that library, but if I used the 64 bit library, it works fine. I want to know is there a way to include a 32bit library if the computer is 32 bit and include a 64 bit library if it is 64 bit
i tried running
node-gyp clean configure build --verbose --arch=ia32
but it will return the below error when i run node index.js
testaddon.node is not a valid Win32 application.
my binding.gyp file for libraries is like below
"libraries": [
"../cppsrc/lib/some32.lib"
]
i checked this link but it doesn't seem to have options for arch in the conditions
Thank you.