ratanakvlun / node-odbc

ODBC bindings for Node.js
ISC License
5 stars 3 forks source link

error: use of undeclared identifier 'boolean' #3

Closed kwent closed 6 years ago

kwent commented 6 years ago

Hi,

Thanks again for improving this lib !

I can't compile from source on OSX. Search for error in the log below:

gyp info spawn args [ '/Users/kwent/Projects/node-odbc2/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kwent/Projects/node-odbc2/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kwent/Projects/node-odbc2/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kwent/.node-gyp/8.4.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/kwent/.node-gyp/8.4.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/kwent/Projects/node-odbc2/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/kwent/.node-gyp/8.4.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/kwent/Projects/node-odbc2',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.4.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/bindings/src/odbc.o
../src/odbc.cpp:215:79: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
    Local<Value> js_result = Nan::New<Function>(ODBCConnection::constructor)->NewIn...
                                                                              ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:3787:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8config.h:332:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/odbc.cpp:262:78: warning: 'NewInstance' is deprecated
      [-Wdeprecated-declarations]
  Local<Object> js_result = Nan::New<Function>(ODBCConnection::constructor)->NewI...
                                                                             ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:3787:3: note: 'NewInstance' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8config.h:332:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/odbc.cpp:306:29: warning: implicit conversion of NULL constant to 'int'
      [-Wnull-conversion]
    memset(columns[i].name, NULL, sizeof(SQLWCHAR));
    ~~~~~~                  ^~~~
                            0
../src/odbc.cpp:332:33: warning: implicit conversion of NULL constant to 'int'
      [-Wnull-conversion]
    memset(columns[i].typeName, NULL, sizeof(SQLWCHAR));
    ~~~~~~                      ^~~~
                                0
../src/odbc.cpp:893:9: error: unknown type name 'boolean'; did you mean 'Boolean'?
        boolean* v = (boolean*)malloc(sizeof(boolean));
        ^~~~~~~
        Boolean
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:2345:17: note: 'Boolean' declared here
class V8_EXPORT Boolean : public Primitive {
                ^
../src/odbc.cpp:893:23: error: use of undeclared identifier 'boolean'
        boolean* v = (boolean*)malloc(sizeof(boolean));
                      ^
../src/odbc.cpp:893:31: error: expected expression
        boolean* v = (boolean*)malloc(sizeof(boolean));
                              ^
../src/odbc.cpp:894:12: error: no viable overloaded '='
        *v = value->BooleanValue();
        ~~ ^ ~~~~~~~~~~~~~~~~~~~~~
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:2345:17: note: candidate function (the
      implicit copy assignment operator) not viable: no known conversion from 'bool' to
      'const v8::Boolean' for 1st argument
class V8_EXPORT Boolean : public Primitive {
                ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:2345:17: note: candidate function (the
      implicit move assignment operator) not viable: no known conversion from 'bool' to
      'v8::Boolean' for 1st argument
../src/odbc.cpp:897:41: error: unknown type name 'boolean'; did you mean 'Boolean'?
        params[i].BufferLength = sizeof(boolean);
                                        ^~~~~~~
                                        Boolean
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:2345:17: note: 'Boolean' declared here
class V8_EXPORT Boolean : public Primitive {
                ^
../src/odbc.cpp:1218:19: warning: 'SetPrototype' is deprecated
      [-Wdeprecated-declarations]
        objError->SetPrototype(Exception::Error(Nan::New((uint16_t *)errorMessa...
                  ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:3212:3: note: 'SetPrototype' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
  ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8config.h:332:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/odbc.cpp:1249:15: warning: 'SetPrototype' is deprecated
      [-Wdeprecated-declarations]
    objError->SetPrototype(Exception::Error(Nan::New(message).ToLocalChecked()));
              ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:3212:3: note: 'SetPrototype' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
  ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8config.h:332:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/odbc.cpp:1265:13: warning: 'SetPrototype' is deprecated
      [-Wdeprecated-declarations]
  objError->SetPrototype(Exception::Error(Nan::New<String>(message).ToLocalChecked()));
            ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8.h:3212:3: note: 'SetPrototype' has been
      explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
  ^
/Users/kwent/.node-gyp/8.4.0/include/node/v8config.h:332:29: note: expanded from macro
      'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
7 warnings and 5 errors generated.
make: *** [Release/obj.target/bindings/src/odbc.o] Error 1

Thoughts ?

Regards

kwent commented 6 years ago

Haven't seen it was not means to be compiled on OSX. Closing.