node-printer icon indicating copy to clipboard operation
node-printer copied to clipboard

nw-gyp rebuild --target=0.39.2 fails with compilation error

Open sridharpg opened this issue 6 years ago • 3 comments

I get the following compilation errors when nwjs target is set above 0.36.*(in my case I tried with 0.39.2)

../src/node_printer_posix.cc:121:70: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
        result_printer_job->Set(V8_STRING_NEW_UTF8("completedTime"), V8_VALUE_NEW(Date, completedTime));
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../src/node_printer_posix.cc:122:69: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
        result_printer_job->Set(V8_STRING_NEW_UTF8("creationTime"), V8_VALUE_NEW(Date, creationTime));
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../src/node_printer_posix.cc:123:71: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
        result_printer_job->Set(V8_STRING_NEW_UTF8("processingTime"), V8_VALUE_NEW(Date, processingTime));
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../src/node_printer_posix.cc:262:54: error: no matching member function for call to 'GetPropertyNames'
            v8::Local<v8::Array> props = iV8Options->GetPropertyNames();
                                         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~

sridharpg avatar Jul 15 '19 09:07 sridharpg

Just to be clear,

nw-gyp rebuild --target=0.36.4 compiles without issues. If the target is over 0.37, nw-gyp starts failing.

sridharpg avatar Jul 15 '19 09:07 sridharpg

Created a pull request for this one.

sridharpg avatar Jul 23 '19 08:07 sridharpg

@sridharpg Your fix work with electron 5.0.1 :D

rurigk avatar Sep 09 '19 02:09 rurigk