Could not install pg module in node.js on Windows 7 - node.js

I try to install pg module to Node.js using this command: npm install pg
At first I had to install Python. Then PostgreSQL 8.x, then Microsoft Visual C++. But still it I cannot do it. I have errors while compiling:
npm http GET https://registry.npmjs.org/pg
npm http 304 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/generic-pool/1.0.9
npm http 304 https://registry.npmjs.org/generic-pool/1.0.9
> pg#0.7.2 install C:\Users\Adam\node_modules\pg
> node-gyp rebuild || (exit 0)
C:\Users\Adam\node_modules\pg>node "C:\Program Files\nodejs\node_modules\npm\bin
\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
binding.cc
c:\users\adam\.node-gyp\0.8.1\src\node_object_wrap.h(57): warning C4251: 'node:
:ObjectWrap::handle_' : class 'v8::Persistent<T>' needs to have dll-interface t
o be used by clients of class 'node::ObjectWrap' [C:\Users\Adam\node_modules\pg
\build\binding.vcxproj]
with
[
T=v8::Object
]
..\src\binding.cc(83): error C2061: syntax error : identifier 'EV_P_' [C:\Users
\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(237): error C2146: syntax error : missing ';' before identifi
er 'read_watcher_' [C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(237): error C4430: missing type specifier - int assumed. Note
: C++ does not support default-int [C:\Users\Adam\node_modules\pg\build\binding
.vcxproj]
..\src\binding.cc(237): error C4430: missing type specifier - int assumed. Note
: C++ does not support default-int [C:\Users\Adam\node_modules\pg\build\binding
.vcxproj]
..\src\binding.cc(238): error C2146: syntax error : missing ';' before identifi
er 'write_watcher_' [C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(238): error C4430: missing type specifier - int assumed. Note
: C++ does not support default-int [C:\Users\Adam\node_modules\pg\build\binding
.vcxproj]
..\src\binding.cc(238): error C4430: missing type specifier - int assumed. Note
: C++ does not support default-int [C:\Users\Adam\node_modules\pg\build\binding
.vcxproj]
..\src\binding.cc(86): error C2065: 'w' : undeclared identifier [C:\Users\Adam\
node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(86): error C2227: left of '->data' must point to class/struct
/union/generic type [C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
type is ''unknown-type''
..\src\binding.cc(87): error C2065: 'revents' : undeclared identifier [C:\Users
\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(117): warning C4800: 'int' : forcing value to bool 'true' or
'false' (performance warning) [C:\Users\Adam\node_modules\pg\build\binding.vcxp
roj]
..\src\binding.cc(247): error C2065: 'read_watcher_' : undeclared identifier [C
:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(247): error C3861: 'ev_init': identifier not found [C:\Users\
Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(248): error C2065: 'read_watcher_' : undeclared identifier [C
:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(248): error C2228: left of '.data' must have class/struct/uni
on [C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
type is ''unknown-type''
..\src\binding.cc(249): error C2065: 'write_watcher_' : undeclared identifier [
C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(249): error C3861: 'ev_init': identifier not found [C:\Users\
Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(250): error C2065: 'write_watcher_' : undeclared identifier [
C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(250): error C2228: left of '.data' must have class/struct/uni
on [C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
type is ''unknown-type''
..\src\binding.cc(312): error C2065: 'EV_DEFAULT_' : undeclared identifier [C:\
Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(312): error C2065: 'write_watcher_' : undeclared identifier [
C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(312): error C3861: 'ev_io_start': identifier not found [C:\Us
ers\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(358): error C2065: 'read_watcher_' : undeclared identifier [C
:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(358): error C2065: 'EV_READ' : undeclared identifier [C:\User
s\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(358): error C3861: 'ev_io_set': identifier not found [C:\User
s\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(359): error C2065: 'write_watcher_' : undeclared identifier [
C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(359): error C2065: 'EV_WRITE' : undeclared identifier [C:\Use
rs\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(359): error C3861: 'ev_io_set': identifier not found [C:\User
s\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(384): error C2065: 'EV_ERROR' : undeclared identifier [C:\Use
rs\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(395): error C2065: 'EV_READ' : undeclared identifier [C:\User
s\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(434): error C2065: 'EV_WRITE' : undeclared identifier [C:\Use
rs\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(623): error C2065: 'EV_DEFAULT_' : undeclared identifier [C:\
Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(623): error C2065: 'write_watcher_' : undeclared identifier [
C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(623): error C3861: 'ev_io_stop': identifier not found [C:\Use
rs\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(629): error C2065: 'EV_DEFAULT_' : undeclared identifier [C:\
Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(629): error C2065: 'write_watcher_' : undeclared identifier [
C:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(629): error C3861: 'ev_io_start': identifier not found [C:\Us
ers\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(635): error C2065: 'EV_DEFAULT_' : undeclared identifier [C:\
Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(635): error C2065: 'read_watcher_' : undeclared identifier [C
:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(635): error C3861: 'ev_io_stop': identifier not found [C:\Use
rs\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(641): error C2065: 'EV_DEFAULT_' : undeclared identifier [C:\
Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(641): error C2065: 'read_watcher_' : undeclared identifier [C
:\Users\Adam\node_modules\pg\build\binding.vcxproj]
..\src\binding.cc(641): error C3861: 'ev_io_start': identifier not found [C:\Us
ers\Adam\node_modules\pg\build\binding.vcxproj]
gyp ERR! rebuild error Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msb
uild.exe` failed with exit code: 1
gyp ERR! rebuild error at ChildProcess.onExit (C:\Program Files\nodejs\node_
modules\npm\node_modules\node-gyp\lib\build.js:214:23)
gyp ERR! rebuild error at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
pg#0.7.2 node_modules\pg
└── generic-pool#1.0.9
Any ideas? Without this module, I cannot connect to my PostgreSQL database through Node.js.

Related

Error building CXX object gnuradio-runtime

I am trying to install a specific version of gnuradio (3.7.10.1). To do so I am not using Pybombs, but I try to do it from source (I am following this).
First I've cloned the github repository, then checkout the appropriate version. It worked fine until I've tried to invoke CMake and build GNU Radio:
mkdir build
cd build
cmake ../
make
During the make, after 6% done, I have the following error:
In file included from /usr/include/c++/7/type_traits:35:0,
from /usr/include/cppunit/tools/StringHelper.h:7,
from /usr/include/cppunit/TestAssert.h:8,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^~~~~
In file included from /usr/include/cppunit/TestAssert.h:8:0,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/tools/StringHelper.h:22:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:22:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:31:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:31:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestAssert.h: In static member function ‘static std::__cxx11::string CppUnit::assertion_traits<T>::toString(const T&)’:
/usr/include/cppunit/TestAssert.h:74:42: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return CPPUNIT_NS::StringHelper::toString(x);
^~~~~~~~
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: At global scope:
/usr/include/cppunit/TestCaller.h:159:37: error: ‘std::function’ has not been declared
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^~~~~~~~
/usr/include/cppunit/TestCaller.h:159:45: error: expected ‘,’ or ‘...’ before ‘<’ token
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^
/usr/include/cppunit/TestCaller.h:200:8: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> m_test_function;
^~~~~~~~
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod)’:
/usr/include/cppunit/TestCaller.h:121:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, m_fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:121:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, m_fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:121:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, m_fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture&)’:
/usr/include/cppunit/TestCaller.h:138:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, &fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:138:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, &fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:138:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, &fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture*)’:
/usr/include/cppunit/TestCaller.h:155:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:155:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:155:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, int)’:
/usr/include/cppunit/TestCaller.h:162:17: error: ‘fixture’ was not declared in this scope
m_fixture(fixture),
^~~~~~~
/usr/include/cppunit/TestCaller.h:162:17: note: suggested alternative: ‘Fixture’
m_fixture(fixture),
^~~~~~~
Fixture
/usr/include/cppunit/TestCaller.h:163:7: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function(test_function)
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:163:23: error: ‘test_function’ was not declared in this scope
m_test_function(test_function)
^~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h: In member function ‘void CppUnit::TestCaller<Fixture>::runTest()’:
/usr/include/cppunit/TestCaller.h:175:7: error: there are no arguments to ‘m_test_function’ that depend on a template parameter, so a declaration of ‘m_test_function’ must be available [-fpermissive]
m_test_function();
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:175:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/cppunit/extensions/HelperMacros.h:14:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/extensions/TestNamer.h: In member function ‘std::__cxx11::string CppUnit::TestNamer::getTestNameFor(const string&, const E&) const’:
/usr/include/cppunit/extensions/TestNamer.h:70:95: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return getTestNameFor(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val);
^~~~~~~~
In file included from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h: In static member function ‘static CppUnit::TestSuite* qa_fxpt::suite()’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘unique_ptr’ is not a member of ‘std’
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: expected primary-expression before ‘>’ token
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘guard’ was not declared in this scope
CPPUNIT_TEST_SUITE_END();
^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: In instantiation of ‘void CppUnit::TestCaller<Fixture>::runTest() [with Fixture = qa_fxpt]’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:102:1: required from here
/usr/include/cppunit/TestCaller.h:175:22: error: ‘m_test_function’ was not declared in this scope
m_test_function();
~~~~~~~~~~~~~~~^~
/usr/include/cppunit/TestCaller.h:175:22: note: suggested alternative: ‘__fortify_function’
m_test_function();
~~~~~~~~~~~~~~~^~
__fortify_function
gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/build.make:62: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o' failed
make[2]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o] Error 1
CMakeFiles/Makefile2:726: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all' failed
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I am not a Linux expert and I am not very familiar to this compiler/library support. I don't really understand where the error comes from and how to correct it.
I use Ubuntu 18.04.
Coud you give me a hand on this please?
Any help would be very appreciated.
Thanks a lot.
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
To resolve the above error you need to compile with -std=c++11 flag. Open CMakeLists.txt, find all occurrences or -std=c++98 and change them to -std=c++11. Then go to the build directory, remove CMakeCache.txt and rebuild
sed -i 's/-std=c++98/-std=c++11/g' CMakeLists.txt
cd build
rm CMakeCache.txt
cmake ..
make
Also as the error is in the cppunit and it's used for testing you can try disabling all tests
cd build
rm CMakeCache.txt
cmake -DENABLE_TESTING=OFF ..
make

Unable to install raw-socket#1.2.6 using the npm 3.10.10

I tried to install raw-socket [1.2.6] module in nodejs using the npm. When I am trying to install the module, got the following error..
Node version : 6.11.3
NPM version : 3.10.10
[test#test node_modules]$ npm install raw-socket2
> raw-socket2#1.2.6 install /home/test/node_modules/raw-socket2
> node-gyp rebuild
make: Entering directory `/home/test/node_modules/raw-socket2/build'
CXX(target) Release/obj.target/raw/src/raw.o
In file included from /home/test/.node-gyp/6.11.3/include/node/node.h:42,
from ../../nan/nan.h:24,
from ../src/raw.cc:4:
/home/test/.node-gyp/6.11.3/include/node/v8.h:345: error: expected unqualified-id before ‘using’
/home/test/.node-gyp/6.11.3/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:362: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:369: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:373: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:441: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: At global scope:
/home/test/.node-gyp/6.11.3/include/node/v8.h:481: error: expected unqualified-id before ‘using’
/home/test/.node-gyp/6.11.3/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:820: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:845: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:857: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: At global scope:
/home/test/.node-gyp/6.11.3/include/node/v8.h:882: error: expected unqualified-id before ‘using’
/home/test/.node-gyp/6.11.3/include/node/v8.h:1119: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h:1125: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:3279: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: At global scope:
/home/test/.node-gyp/6.11.3/include/node/v8.h:4499: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h:4515: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:7544: error: ‘nullptr’ was not declared in this scope
In file included from ../../nan/nan.h:111,
from ../src/raw.cc:4:
../../nan/nan_new.h: At global scope:
../../nan/nan_new.h:24: error: template declaration of ‘v8::Local<T> Nan::imp::To’
../../nan/nan_new.h:24: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_new.h:24: error: expected primary-expression before ‘>’ token
../../nan/nan_new.h:24: error: ‘i’ was not declared in this scope
../../nan/nan_new.h:29: error: expected initializer before ‘<’ token
../../nan/nan_new.h:34: error: expected initializer before ‘<’ token
../../nan/nan_new.h:39: error: expected initializer before ‘<’ token
../../nan/nan_new.h:66: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:66: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:65: error: default argument missing for parameter 2 of ‘static v8::Local<v8::Context> Nan::imp::Factory<v8::Context>::New(v8::ExtensionConfiguration*, int)’
../../nan/nan_new.h:85: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:85: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:93: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:93: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:92: error: default argument missing for parameter 2 of ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const v8::FunctionCallbackInfo<v8::Value>&), int)’
../../nan/nan_new.h:139: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:139: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:151: error: ISO C++ forbids declaration of ‘Handle’ with no type
../../nan/nan_new.h:151: error: typedef name may not be a nested-name-specifier
../../nan/nan_new.h:151: error: expected ‘;’ before ‘<’ token
../../nan/nan_new.h:152: error: ‘FTH’ has not been declared
../../nan/nan_new.h:152: error: ‘FTH’ was not declared in this scope
../../nan/nan_new.h:171: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:171: error: expected ‘,’ or ‘...’ before ‘<’ token
In file included from ../../nan/nan_new.h:191,
from ../../nan/nan.h:111,
from ../src/raw.cc:4:
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::BooleanObject> Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../../nan/nan_implementation_12_inl.h:49: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:4009)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:56: error: ‘v8::Handle’ has not been declared
../../nan/nan_implementation_12_inl.h:56: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Context> Nan::imp::Factory<v8::Context>::New(v8::ExtensionConfiguration*, int)’:
../../nan/nan_implementation_12_inl.h:58: error: ‘tmpl’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:58: error: ‘obj’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:79: error: ‘v8::Handle’ has not been declared
../../nan/nan_implementation_12_inl.h:79: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const v8::FunctionCallbackInfo<v8::Value>&), int)’:
../../nan/nan_implementation_12_inl.h:82: error: ‘data’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:89: error: ‘v8::Handle’ has not been declared
../../nan/nan_implementation_12_inl.h:89: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const v8::FunctionCallbackInfo<v8::Value>&), int)’:
../../nan/nan_implementation_12_inl.h:93: error: ‘data’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:94: error: ‘signature’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: In static member function ‘static typename Nan::imp::IntegerFactory<T>::return_t Nan::imp::IntegerFactory<T>::New(int32_t)’:
../../nan/nan_implementation_12_inl.h:117: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:117: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static typename Nan::imp::IntegerFactory<T>::return_t Nan::imp::IntegerFactory<T>::New(uint32_t)’:
../../nan/nan_implementation_12_inl.h:123: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:123: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Uint32> Nan::imp::Factory<v8::Uint32>::New(int32_t)’:
../../nan/nan_implementation_12_inl.h:128: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:128: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Uint32> Nan::imp::Factory<v8::Uint32>::New(uint32_t)’:
../../nan/nan_implementation_12_inl.h:134: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:134: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:156: error: ‘v8::Local<v8::RegExp> Nan::imp::Factory<v8::RegExp>::New’ is not a static member of ‘struct Nan::imp::Factory<v8::RegExp>’
../../nan/nan_implementation_12_inl.h:156: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_implementation_12_inl.h:156: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h:156: error: ‘pattern’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:157: error: expected primary-expression before ‘flags’
../../nan/nan_implementation_12_inl.h:157: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Script> Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:166: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1352)
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Script> Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan_implementation_12_inl.h:173: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1352)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:179: error: ‘v8::Local<v8::Signature> Nan::imp::Factory<v8::Signature>::New’ is not a static member of ‘struct Nan::imp::Factory<v8::Signature>’
../../nan/nan_implementation_12_inl.h:179: error: ‘FTH’ is not a member of ‘Nan::imp::Factory<v8::Signature>’
../../nan/nan_implementation_12_inl.h:179: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::String> Nan::imp::Factory<v8::String>::New(const uint8_t*, int)’:
../../nan/nan_implementation_12_inl.h:206: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:2332)
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::String> Nan::imp::Factory<v8::String>::New(v8::String::ExternalStringResource*)’:
../../nan/nan_implementation_12_inl.h:217: warning: ‘static v8::Local<v8::String> v8::String::NewExternal(v8::Isolate*, v8::String::ExternalStringResource*)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:2371)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:228: error: ‘v8::Local<v8::StringObject> Nan::imp::Factory<v8::StringObject>::New’ is not a static member of ‘struct Nan::imp::Factory<v8::StringObject>’
../../nan/nan_implementation_12_inl.h:228: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_implementation_12_inl.h:228: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h:228: error: ‘value’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:228: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::UnboundScript> Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:237: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1333)
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::UnboundScript> Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan_implementation_12_inl.h:244: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1333)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:253: error: ‘NanNew’ declared as an ‘inline’ variable
../../nan/nan_implementation_12_inl.h:253: error: template declaration of ‘v8::Local<T> NanNew’
../../nan/nan_implementation_12_inl.h:253: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_implementation_12_inl.h:253: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h:253: error: ‘h’ was not declared in this scope
.
.
.
../../nan/nan.h:2112: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan.h:2109: warning: ‘_NanGetExternalParts’ defined but not used
make: *** [Release/obj.target/raw/src/raw.o] Error 1
make: Leaving directory `/home/test/node_modules/raw-socket2/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:219:12)
gyp ERR! System Linux 2.6.32-642.el6.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/test/node_module`enter code here`s/raw-socket2
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN watchdog#1.0.0 No repository field.
npm WARN watchdog#1.0.0 license should be a valid SPDX license expression
npm ERR! Linux 2.6.32-642.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "raw-socket2"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! raw-socket2#1.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raw-socket2#1.2.6 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the raw-socket2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs raw-socket2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls raw-socket2
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/test/node_modules/npm-debug.log
We tried the same in different version of nodejs. But, work fine in the version0.10.36.
You're not installing raw-socket, you're installing raw-socket2, which is a fork of the former, but one that hasn't been maintained very well (and therefore doesn't install on more recent versions of Node.js).
The original raw-socket seems to work okay in Node 8 (although the compiler does emit various warnings during installation, but warnings aren't errors).

LNK errors during built project with libcurl added

I've solved for 2 weeks how to build libcurl project. Finally today I managed it, I followed http://curl.haxx.se/libcurl/c/Using-libcurl-with-SSH-support-in-Visual-Studio-2010.pdf but after I wanted to add libcurl to my own project, it throws lot of LNK errors. So here is code my own project, where I want to add libcurl. It's only for downloading file from url:
#include "stdafx.h"
#include "DlData.h"
#include "curl.h"
//#define CURL_STATICLIB
//#pragma comment(lib, "libcurld")
//#pragma comment(lib, "ws2_32")
//#pragma comment(lib, "Wldap32.lib")
size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
size_t written = fwrite(ptr, size, nmemb, stream);
return written;
};
int _tmain(int argc, _TCHAR* argv[])
{
DlData test;
test.PrintMsg("this is test!");
test.WaitForClick();
//Part for download file
CURL *curl;
ofstream fp;
CURLcode res;
char *url = "http://football-data.co.uk/mmz4281/1415/E0.csv";
char outfilename[FILENAME_MAX] = "C:\\Users\\zdenik\\Documents\\GitProjects\\Predictor\\Files\\";
curl = curl_easy_init();
if (curl)
{
fp.open(outfilename);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
fp.close();
}
cin.get();
return 0;
}
I set my project properties properly (C/C++ - General, Preprocessor, Linker - General, Input) and want to build it as application - exe file. So far I everything went well and I was able to create libcurld.lib which I added to linker in my project properties. After I built it, it throws a lot of LNK errors and it looks like there is no lib added. Here is output:
1>------ Build started: Project: Predictor, Configuration: Debug Win32 ------
1> stdafx.cpp
1> Main.cpp
1> DlData.cpp
1> Generating Code...
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _calloc already defined in LIBCMTD.lib(dbgcalloc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _realloc already defined in LIBCMTD.lib(dbgrealloc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __strtoi64 already defined in LIBCMTD.lib(strtoq.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __errno already defined in LIBCMTD.lib(dosmap.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _tolower already defined in LIBCMTD.lib(tolower.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fseek already defined in LIBCMTD.lib(fseek.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _ftell already defined in LIBCMTD.lib(ftell.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isalpha already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isxdigit already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strtoul already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isdigit already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fputc already defined in LIBCMTD.lib(fputc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memchr already defined in LIBCMTD.lib(memchr.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isalnum already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _atoi already defined in LIBCMTD.lib(atox.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __lseeki64 already defined in LIBCMTD.lib(lseeki64.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isupper already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _islower already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isprint already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isgraph already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info##AAE#ABV0##Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info##AAEAAV0#ABV0##Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __read already defined in LIBCMTD.lib(read.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __write already defined in LIBCMTD.lib(write.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __strnicmp already defined in LIBCMTD.lib(strnicmp.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __close already defined in LIBCMTD.lib(close.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __open already defined in LIBCMTD.lib(open.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcurld.lib(easy.obj) : error LNK2019: unresolved external symbol __imp__WSAStartup#8 referenced in function _win32_init
1>libcurld.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__WSAStartup#8
1>libcurld.lib(easy.obj) : error LNK2019: unresolved external symbol __imp__WSACleanup#0 referenced in function _win32_cleanup
1>libcurld.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__WSACleanup#0
1>libcurld.lib(misc.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(openssl.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(telnet.obj) : error LNK2019: unresolved external symbol __imp__WSAGetLastError#0 referenced in function _printsub
1>libcurld.lib(tftp.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(asyn-thread.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(select.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(sendf.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(connect.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(global.obj) : error LNK2019: unresolved external symbol _OPENSSL_add_all_algorithms_noconf referenced in function _libssh2_init
1>libcurld.lib(openssl.obj) : error LNK2001: unresolved external symbol _OPENSSL_add_all_algorithms_noconf
...
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_load_error_strings referenced in function _Curl_ossl_init
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_SESSION_free referenced in function _Curl_ossl_session_free
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_set_session referenced in function _ossl_connect_step1
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_get_peer_certificate referenced in function _servercert
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_get_peer_cert_chain referenced in function _verifystatus
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_verify referenced in function _ossl_connect_step1
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_default_passwd_cb referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_default_passwd_cb_userdata referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_check_private_key referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_new referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_free referenced in function _Curl_ossl_close
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_connect referenced in function _ossl_connect_step2
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_read referenced in function _Curl_ossl_shutdown
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_peek referenced in function _Curl_ossl_check_cxn
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_write referenced in function _ossl_send
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_ctrl referenced in function _verifystatus
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_ctrl referenced in function _ossl_connect_step1
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_get_error referenced in function _Curl_ossl_shutdown
...
1>C:\Users\zdenik\Documents\GitProjects\Predictor\Debug\Predictor.exe : fatal error LNK1120: 213 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
My question is simple. What could be wrong with my project properties settings or how to set libcurld.lib properly?
I finally done it. I downloaded precompiled version of libcurl for Windows 32bit, but before I compiled code, I noticed there is error in char outfilename[FILENAME_MAX] = "C:\Users\zdenik\Documents\GitProjects\Predictor\Files\" row. It is needed to add name of the file at the end of the path string - C:\Users\zdenik\Documents\GitProjects\Predictor\Files\file.csv e.g. It would not cause compile error but app would crash after it's triggering.
After that code compiled successfully.

error: use of undeclared identifier 'NODE_PSYMBOL'

Trying to install pg. Here's the full log:
$ npm install pg --save
npm WARN package.json hs-app#0.0.0 No description
npm WARN package.json hs-app#0.0.0 No repository field.
npm WARN package.json hs-app#0.0.0 No README data
npm http GET https://registry.npmjs.org/pg
npm http 304 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/generic-pool/2.0.3
npm http GET https://registry.npmjs.org/buffer-writer/1.0.0
npm http 304 https://registry.npmjs.org/generic-pool/2.0.3
npm http 304 https://registry.npmjs.org/buffer-writer/1.0.0
npm http GET https://registry.npmjs.org/cloned/0.0.1
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/cloned/0.0.1
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rmdir
npm http 304 https://registry.npmjs.org/rmdir
> pg#2.3.1 install /Users/David/Developer/hs-app/node_modules/pg
> node-gyp rebuild || (exit 0)
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:49:51: warning: 'New' is deprecated [-Wdeprecated-declarations]
Local<FunctionTemplate> t = FunctionTemplate::New(New);
^
../src/binding.cc:54:19: error: use of undeclared identifier 'NODE_PSYMBOL'
emit_symbol = NODE_PSYMBOL("emit");
^
../src/binding.cc:55:23: error: use of undeclared identifier 'NODE_PSYMBOL'
severity_symbol = NODE_PSYMBOL("severity");
^
../src/binding.cc:56:19: error: use of undeclared identifier 'NODE_PSYMBOL'
code_symbol = NODE_PSYMBOL("code");
^
../src/binding.cc:57:21: error: use of undeclared identifier 'NODE_PSYMBOL'
detail_symbol = NODE_PSYMBOL("detail");
^
../src/binding.cc:58:19: error: use of undeclared identifier 'NODE_PSYMBOL'
hint_symbol = NODE_PSYMBOL("hint");
^
../src/binding.cc:59:23: error: use of undeclared identifier 'NODE_PSYMBOL'
position_symbol = NODE_PSYMBOL("position");
^
../src/binding.cc:60:31: error: use of undeclared identifier 'NODE_PSYMBOL'
internalPosition_symbol = NODE_PSYMBOL("internalPosition");
^
../src/binding.cc:61:28: error: use of undeclared identifier 'NODE_PSYMBOL'
internalQuery_symbol = NODE_PSYMBOL("internalQuery");
^
../src/binding.cc:62:20: error: use of undeclared identifier 'NODE_PSYMBOL'
where_symbol = NODE_PSYMBOL("where");
^
../src/binding.cc:63:19: error: use of undeclared identifier 'NODE_PSYMBOL'
file_symbol = NODE_PSYMBOL("file");
^
../src/binding.cc:64:19: error: use of undeclared identifier 'NODE_PSYMBOL'
line_symbol = NODE_PSYMBOL("line");
^
../src/binding.cc:65:22: error: use of undeclared identifier 'NODE_PSYMBOL'
routine_symbol = NODE_PSYMBOL("routine");
^
../src/binding.cc:66:19: error: use of undeclared identifier 'NODE_PSYMBOL'
name_symbol = NODE_PSYMBOL("name");
^
../src/binding.cc:67:20: error: use of undeclared identifier 'NODE_PSYMBOL'
value_symbol = NODE_PSYMBOL("value");
^
../src/binding.cc:68:19: error: use of undeclared identifier 'NODE_PSYMBOL'
type_symbol = NODE_PSYMBOL("dataTypeID");
^
../src/binding.cc:69:22: error: use of undeclared identifier 'NODE_PSYMBOL'
channel_symbol = NODE_PSYMBOL("channel");
^
../src/binding.cc:70:22: error: use of undeclared identifier 'NODE_PSYMBOL'
payload_symbol = NODE_PSYMBOL("payload");
^
../src/binding.cc:71:22: error: use of undeclared identifier 'NODE_PSYMBOL'
command_symbol = NODE_PSYMBOL("command");
^
../src/binding.cc:73:45: error: address of overloaded function 'Connect' does not match required type 'void (const v8::FunctionCallbackInfo<v8::Value> &)'
NODE_SET_PROTOTYPE_METHOD(t, "connect", Connect);
^~~~~~~
../src/binding.cc:447:8: note: candidate function has type mismatch at 1st parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const char *')
bool Connect(const char* conninfo)
^
../src/binding.cc:107:3: note: candidate function has type mismatch at 1st parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const v8::Arguments &')
Connect(const Arguments& args)
^
/Users/David/.node-gyp/0.11.4/src/node.h:152:60: note: passing argument to parameter 'callback' here
v8::FunctionCallback callback) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/David/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:103:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/Users/David/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/David/Developer/hs-app/node_modules/pg
gyp ERR! node -v v0.11.4
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
pg#2.3.1 node_modules/pg
├── generic-pool#2.0.3
└── buffer-writer#1.0.0 (async#0.2.9, cloned#0.0.1)
The maintainer of node-postgres, Brian C, answered the following in the issue I had opened on github:
The native bindings wont compile on v.0.11.x yet. Every minor version for the past 4 they've substantially changed the C/C++ layer and the native bindings always break. I'm not going to go through the effort of fixing them until closer to the v0.12.0 release because the code is still in flux on node's end and will break again.
Good news, you're not hosed:
use the non-native bindings (require('pg')) which install even if the compilation fails
use node v0.10.x

Visual c++ 6.0: error C2065: 'PWR_CString' : undeclared identifier

This error for the following: C:\software\CATS\includes\Commun\xml_transfer.cpp(1527) : error C2065: 'PWR_CString' : undeclared identifier
CString s1; // Empty string
I did include:"stdafx.h" , "resource.h"

Resources