You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node v0.12.7 cross-compile failure on ubuntu 14.04 and gcc 4.8.4 #3181
I am compiling node v0.12.7 on ubuntu 14.04 running in a VM. I want to have a windows executable ./configure --dest-cpu=x64 --dest-os=win
make
In file included from ../src/node_counters.h:28:0, from ../src/node.cc:31: ../src/node_win32_perfctr_provider.h:33:8: error: ‘HANDLE’ does not name a type extern HANDLE NodeCounterProvider; ^ ../src/node_win32_perfctr_provider.h: In function ‘bool node::NODE_COUNTER_ENABLED()’: ../src/node_win32_perfctr_provider.h:35:45: error: ‘NodeCounterProvider’ was not declared in this scope INLINE bool NODE_COUNTER_ENABLED() { return NodeCounterProvider != NULL; }
It's not quite that easy. You can compile for Windows using a mingw cross compiler, but I'm not sure that mingw is really supported these days. Most likely you are going to need to compile under Visual Studio (at least Express), which means you'd need a Windows machine.
Well, apparently someone has a set of patches for node v0.10.40 (as of this writing) for mingw-w64. So that might be a starting point, although there were a lot of changes between v0.10.40 and v4.x, so those patches may only help so much.
Activity
mscdex commentedon Oct 5, 2015
It's not quite that easy. You can compile for Windows using a mingw cross compiler, but I'm not sure that mingw is really supported these days. Most likely you are going to need to compile under Visual Studio (at least Express), which means you'd need a Windows machine.
Junkern commentedon Oct 5, 2015
I feared that such an answer would come up (would have been too easy to be true). Anyone knows whether compiling with mingw works?
mscdex commentedon Oct 5, 2015
Well, apparently someone has a set of patches for node v0.10.40 (as of this writing) for mingw-w64. So that might be a starting point, although there were a lot of changes between v0.10.40 and v4.x, so those patches may only help so much.
Junkern commentedon Oct 5, 2015
I am building node v0.12.7, btw ;) But still thanks a lot, I will look into this!