user995928
user995928

Reputation:

Cross compile nodejs modules to Windows with node-gyp

Due to some compiler problems on my Windows 7 x64 machine, I have to compile all my code on my Linux ARM box. How can I cross compile node modules with node gyp? Thanks in advance.

Upvotes: 4

Views: 1747

Answers (1)

JoeAndrieu
JoeAndrieu

Reputation: 834

There are two problems here. First, you have to get cross-compiling set up to go from your ARM box to Windows.

This should help: http://wiki.wxwidgets.org/Cross-Compiling_Under_Linux

Then (assuming your compilers and linker are set up: CXX, etc.), you just need to specify the architecture when running node-gyp:

node-gyp --arch x64 rebuild

That should do it.

Upvotes: 1

Related Questions