Socket.io with npm on windows 8.1 - node.js

I wan't to install socket.io with npm 2.7.4, node 0.12.2 on windows 8.1 & get this error:
modules\engine.io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(518): error C4430: missing type specifier - in
t assumed. Note: C++ does not support default-int [C:...\websocket\node_modules\socket.io\node_modules\so
cket.io-client\node_modules\engine.io-client\node_modules\ws\build\validation.v
cxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(490): error C2065: 'request' : undeclared iden
tifier [C:...\websocket\no
de_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-clien
t\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(490): error C2228: left of '.data' must have c
lass/struct/union [C:...\w
ebsocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\engi
ne.io-client\node_modules\ws\build\validation.vcxproj]
type is ''unknown-type''
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(529): error C2039: 'NewSymbol' : is not a memb
er of 'v8::String' [C:...\
websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\eng
ine.io-client\node_modules\ws\build\validation.vcxproj]
C:....node-gyp\0.12.0\deps\v8\include\v8.h(1599) : see decl
aration of 'v8::String'
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(529): error C3861: 'NewSymbol': identifier not
found [C:...\websocket\no
de_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-clien
t\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(536): error C2039: 'NewSymbol' : is not a memb
er of 'v8::String' [C:...\
websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\eng
ine.io-client\node_modules\ws\build\validation.vcxproj]
C:\Users....node-gyp\0.12.0\deps\v8\include\v8.h(1599) : see decl
aration of 'v8::String'
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(536): error C2228: left of '.As' must have cla
ss/struct/union [C:...\web
socket\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
.io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(536): error C2059: syntax error : ')' [C:...\websocket\node_modules\sock
et.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\
ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(549): error C2039: 'New' : is not a member of
'v8::String' [C:...\websoc
ket\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io
-client\node_modules\ws\build\validation.vcxproj]
C:....node-gyp\0.12.0\deps\v8\include\v8.h(1599) : see decl
aration of 'v8::String'
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(550): error C2466: cannot allocate an array of
constant size 0 [C:...\we
bsocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\engin
e.io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(550): error C2440: 'initializing' : cannot con
vert from 'int' to 'v8::Local' [C:...\websocket\node_modules\socket.io\node_modules\socket.io-client\n
ode_modules\engine.io-client\node_modules\ws\build\validation.vcxproj]
with
[
T=v8::Value
]
No constructor could take the source type, or constructor overload re
solution was ambiguous
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(549): error C3861: 'New': identifier not found
[C:...\websocket\node_mod
ules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node
_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(555): error C2065: 'uv_work_t' : undeclared id
entifier [C:...\websocket\
node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cli
ent\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(555): error C2065: 'req' : undeclared identifi
er [C:...\websocket\node_m
odules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\no
de_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(555): error C2448: 'NanAsyncExecute' : functio
n-style initializer appears to be a function definition [C:\Users...\websocket\node_modules\socket.io\node_modu
les\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\valida
tion.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(560): error C2065: 'uv_work_t' : undeclared id
entifier [C:...\websocket\
node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cli
ent\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(560): error C2065: 'req' : undeclared identifi
er [C:...\websocket\node_m
odules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\no
de_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(560): error C2448: 'NanAsyncExecuteComplete' :
function-style initializer appears to be a function definition [C:\Users...\websocket\node_modules\socket.io\n
ode_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\buil
d\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(570): error C2039: 'request' : is not a member
of 'NanAsyncWorker' [C:...\websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\e
ngine.io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\
node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-c
lient\node_modules\ws\node_modules\nan\nan.h(487) : see declaration of 'NanAs
yncWorker'
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(571): error C2065: 'NanAsyncExecute' : undecla
red identifier [C:...\webs
ocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.
io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(571): error C2065: 'uv_after_work_cb' : undecl
ared identifier [C:...\web
socket\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
.io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(572): error C2146: syntax error : missing ')'
before identifier 'NanAsyncExecuteComplete' [C:\Users...\websocket\node_modules\socket.io\node_modules\socket.i
o-client\node_modules\engine.io-client\node_modules\ws\build\validation.vcxproj
]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(572): error C2059: syntax error : ')' [C:...\websocket\node_modules\sock
et.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\
ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(716): error C2661: 'v8::Local::New' : no ov
erloaded function takes 1 arguments [C:...\websocket\node_modules\socket.io\node_modules\socket.io-client
\node_modules\engine.io-client\node_modules\ws\build\validation.vcxproj]
with
[
T=v8::String
]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(769): error C2039: 'AsciiValue' : is not a mem
ber of 'v8::String' [C:...
\websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\en
gine.io-client\node_modules\ws\build\validation.vcxproj]
C:....node-gyp\0.12.0\deps\v8\include\v8.h(1599) : see decl
aration of 'v8::String'
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(769): error C2065: 'AsciiValue' : undeclared i
dentifier [C:...\websocket
\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cl
ient\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(769): error C2146: syntax error : missing ';'
before identifier 'value' [C:...\websocket\node_modules\socket.io\node_modules\socket.io-client\node_modu
les\engine.io-client\node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(769): error C3861: 'value': identifier not fou
nd [C:...\websocket\node_m
odules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\no
de_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(817): warning C4267: 'argument' : conversion f
rom 'size_t' to 'int', possible loss of data [C:\Users...\websocket\node_modules\socket.io\node_modules\socket.
io-client\node_modules\engine.io-client\node_modules\ws\build\validation.vcxpro
j]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(829): warning C4267: 'argument' : conversion f
rom 'size_t' to 'int', possible loss of data [C:...\websocket\node_modules\socket.io\node_modules\socket.
io-client\node_modules\engine.io-client\node_modules\ws\build\validation.vcxpro
j]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(832): error C2065: 'value' : undeclared identi
fier [C:...\websocket\node
_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\
node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(840): error C2065: 'value' : undeclared identi
fier [C:...\websocket\node
_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\
node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(840): error C2228: left of '.length' must have
class/struct/union [C:...
\websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\en
gine.io-client\node_modules\ws\build\validation.vcxproj]
type is ''unknown-type''
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(858): warning C4267: 'argument' : conversion f
rom 'size_t' to 'int', possible loss of data [C:...\websocket\node_modules\socket.io\node_modules\socket.
io-client\node_modules\engine.io-client\node_modules\ws\build\validation.vcxpro
j]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(873): error C2065: 'value' : undeclared identi
fier [C:...\websocket\node
_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\
node_modules\ws\build\validation.vcxproj]
C:...\websocket\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\nan\nan.h(873): error C2228: left of '.length' must have
class/struct/union [C:...
\websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\en
gine.io-client\node_modules\ws\build\validation.vcxproj]
type is ''unknown-type''
..\src\validation.cc(108): error C2248: 'v8::HandleScope::HandleScope' : cannot
access protected member declared in class 'v8::HandleScope' [C:...\websocket\node_modules\socket.io\node
_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\v
alidation.vcxproj]
C:....node-gyp\0.12.0\deps\v8\include\v8.h(816) : see decla
ration of 'v8::HandleScope::HandleScope'
C:....node-gyp\0.12.0\deps\v8\include\v8.h(800) : see decla
ration of 'v8::HandleScope'
..\src\validation.cc(109): error C2664: 'v8::FunctionTemplate::New' : cannot co
nvert parameter 1 from 'void (__cdecl *)(const v8::FunctionCallbackInfo &)'
to 'v8::Isolate *' [C:...\
websocket\node_modules\socket.io\node_modules\socket.io-client\node_modules\eng
ine.io-client\node_modules\ws\build\validation.vcxproj]
with
[
T=v8::Value
]
There is no context in which this conversion is possible
..\src\validation.cc(112): error C2039: 'NewSymbol' : is not a member of 'v8::S
tring' [C:...\websocket\no
de_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-clien
t\node_modules\ws\build\validation.vcxproj]
C:....node-gyp\0.12.0\deps\v8\include\v8.h(1599) : see decl
aration of 'v8::String'
..\src\validation.cc(112): error C3861: 'NewSymbol': identifier not found [C:...\websocket\node_modules\s
ocket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modul
es\ws\build\validation.vcxproj]
..\src\validation.cc(134): error C2660: 'v8::True' : function does not take 0 a
rguments [C:...\websocket\
node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cli
ent\node_modules\ws\build\validation.vcxproj]
..\src\validation.cc(134): error C2660: 'v8::False' : function does not take 0
arguments [C:...\websocket
\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-cl
ient\node_modules\ws\build\validation.vcxproj]
socket.io#1.3.5 node_modules\socket.io
├── debug#2.1.0 (ms#0.6.2)
├── has-binary-data#0.1.3 (isarray#0.0.1)
├── socket.io-adapter#0.3.1 (object-keys#1.0.1, debug#1.0.2, socket.io-parser#2.
2.2)
├── socket.io-parser#2.2.4 (isarray#0.0.1, debug#0.7.4, component-emitter#1.1.2,
benchmark#1.0.0, json3#3.2.6)
├── engine.io#1.5.1 (base64id#0.1.0, debug#1.0.3, engine.io-parser#1.2.1, ws#0.5
.0)
└── socket.io-client#1.3.5 (to-array#0.1.3, indexof#0.0.1, component-bind#1.0.0,
debug#0.7.4, backo2#1.0.2, object-component#0.0.3, component-emitter#1.1.2, has
-binary#0.1.6, parseuri#0.0.2, engine.io-client#1.5.1)
See solution in comments

i had some help on github, you can check the temporary solution there https://github.com/Automattic/socket.io/issues/2072

Related

Insl and outsl gives "Matching constraint does not allow a register" error

So here's the code in XV6 source code (x86.h):
static inline void
outsl(int port, void* addr, int cnt)
{
asm volatile("cld; rep outsl" :
"=S" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"cc");
}
static inline void
insl(int port, void* addr, int cnt)
{
asm volatile("cld; rep insl" :
"=D" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"memory", "cc");
}
It gives this error:
kernel/x86.h:7:3: error: matching constraint does not allow a register [-Werror]
7 | "cc");
| ^~~~
kernel/x86.h:4:3: error: matching constraint does not allow a register [-Werror]
4 | asm volatile("cld; rep outsl" :
| ^~~
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
53 | }
| ^
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c: In function ‘read_pci_config’:
kernel/sound.c:17:3: error: matching constraint does not allow a register [-Werror]
17 | outsl(0xcf8, &tmp, 1);
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sound.c:17:3: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:17:3: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
53 | }
| ^
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:53:1: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:13:6: error: matching constraint does not allow a register [-Werror]
13 | uint read_pci_config(uchar bus, uchar slot, uchar func, uchar offset)
| ^~~~~~~~~~~~~~~
kernel/sound.c:13:6: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:13:6: error: matching constraint does not allow a register [-Werror]
kernel/sound.c:13:6: error: matching constraint does not allow a register [-Werror]
In file included from kernel/sound.c:10:
kernel/x86.h:4:3: error: matching constraint does not allow a register [-Werror]
4 | asm volatile("cld; rep outsl" :
| ^~~
kernel/x86.h:4:3: error: output number 0 not directly addressable
kernel/x86.h:4:3: error: matching constraint does not allow a register [-Werror]
kernel/x86.h:4:3: error: asm operand 3 probably doesn’t match constraints [-Werror]
cc1: all warnings being treated as errors
make: *** [<builtin>: kernel/sound.o] Error 1
Does anyone had any idea what's the cause of such error?
FYI I'm using the code from older XV6 versions in the latest XV6 version (2021.9). I tried using the original io.h which also has the 2 functions, but it gives the same error.

C++, std::list, how to calculate index from iterator

I have a list and I'm using an iterator to locate an item in the list:
std::list<std::string> groupsList = { Constants::Item1, Constants::Item2, ... };
std::list<std::string>::iterator groupListItr = std::find(groupsList.begin(), groupsList.end(), group);
if ( groupListItr == grousList.end() ) {
return;
}
uint16_t groupIdx = (uint16_t)(groupListItr - groupsList.begin());
In the above find call "group" is the string to locate. I'm trying to figure out how to get the position of the found item in the list, if there is an easier way to do this please let me know, the calculation of the index results in an error when compiling:
error C2784: 'unknown-type std::operator -(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'std::_List_iterator<std::_List_val<std::_List_simple_types<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>>'
1> c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility(937) : see declaration of 'std::operator -'
The solution:
uint16_t groupIdx = (uint16_t)std::distance(groupsList.begin(), groupListItr);

Cygwin new user *how to generate an executable?

I just installed Cygwin -I’m new user. I’m following instructions, but I’m stuck.
I need to generate an executable of the software I want to use, which was made in c++. When I type”make” in the right directory I have a list of errors and I don’t know what they mean. It may be something with my makefile?
Here are the instructions:
“The enclosed makefile should allow Match to be built on any GNU-based compiler platform as well as many others. You may need to modify the makefile if your compiler is not named "c++" or requires different command line options. ”
Here the errors:
$ make
c++ -O4 -c match.cc -o match.o -Wall -g
In file included from match.cc:37:0:
series.hh: In member function ‘void core::insert(const point&, int)’:
series.hh:161:5: error: ‘memmove’ was not declared in this scope
memmove(&data[i+1], &data[i], sizeof(point)*(size-i-1));
^~~~~~~
series.hh:161:5: note: suggested alternative: ‘wmemmove’
memmove(&data[i+1], &data[i], sizeof(point)*(size-i-1));
^~~~~~~
wmemmove
series.hh: In member function ‘void core::erase(int)’:
series.hh:166:5: error: ‘memmove’ was not declared in this scope
memmove(&data[i], &data[i+1], sizeof(point)*(size-i-1));
^~~~~~~
series.hh:166:5: note: suggested alternative: ‘wmemmove’
memmove(&data[i], &data[i+1], sizeof(point)*(size-i-1));
^~~~~~~
wmemmove
series.hh: In member function ‘int core::averageduplicates()’:
series.hh:214:2: error: ‘memmove’ was not declared in this scope
memmove(&data[i+1],&data[j],sizeof(point)*(size-j));
^~~~~~~
series.hh:214:2: note: suggested alternative: ‘wmemmove’
memmove(&data[i+1],&data[j],sizeof(point)*(size-j));
^~~~~~~
wmemmove
series.hh: At global scope:
series.hh:239:25: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
void build_labelmap() throw(format_error) {
^~~~~
series.hh:253:44: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
int lookup_label(int label, float depth) throw(format_error) {
^~~~~
series.hh:410:50: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
void addtiept(vector<tiept> &tiemap, tiept &t) throw(format_error) {
^~~~~
series.hh:433:42: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
void buildmaps(series &s1, series &s2) throw(format_error) {
^~~~~
series.hh:474:48: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
tiepts read_tiefile(string name, ostream &log) throw(format_error);
^~~~~
series.hh:488:30: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
void apply_gaps(series &s) throw(format_error) {
^~~~~
series.hh:539:32: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
gaps read_gapfile(string name) throw(format_error);
^~~~~
make: *** [Makefile:10: match.o] Error 1
Here the makefile:
VERSION=2.3
all: match
%: %.o
c++ $^ -o $# $(LDFLAGS)
.cc.o:
# c++ -c $< -o $# -Wall -g $(CFLAGS)
c++ -O4 -c $< -o $# -Wall -g $(CFLAGS)
match: match.o series.o config.o normalize.o floatnan.o
match.o: match.cc config.hh series.hh normalize.hh floatnan.hh
series.o: series.cc series.hh floatnan.hh
config.o: config.cc config.hh floatnan.hh
normalize.o: normalize.cc normalize.hh series.hh floatnan.hh
floatnan.o: floatnan.cc floatnan.hh
clean:
rm -f *.o match *~ match.exe match.log *.new xmatch score_matrix
tar:
sed '/\S/ ! d;s/^/Match-${VERSION}\//' ../manifest > ../manifest.tmp
tar -cz -C ../.. -f ../match-${VERSION}.tgz -T ../manifest.tmp
check-manifest:
cd .. && find . -type f | sed 's/^.\///' | grep -v ,v | sort > manifest.tmp
sort ../manifest > ../manifest.tmp1
diff ../manifest.tmp1 ../manifest.tmp; true
pwd | grep 'Match-${VERSION}/' > /dev/null || (echo version mismatch; false)
Following an advice as per comment below, in the file "series.hh", I replaced "memmove" by "std::memmove".
I type "make" again, and now I get this:
$ make
c++ -O4 -c match.cc -o match.o -Wall -g
In file included from match.cc:37:0:
series.hh:9:1: error: expected unqualified-id before string constant
"//This program is distributed in the hope that it will be useful,"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/fstream:42:0,
from series.hh:36,
from match.cc:37:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:57:7: error: ‘__c_file’ does not name a type; did you mean ‘__basic_file’?
__c_file* _M_cfile;
^~~~~~~~
__basic_file
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:63:28: error: expected ‘)’ before ‘*’ token
__basic_file(__c_lock* __lock = 0) throw ();
^
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:66:41: error: ‘__c_lock’ has not been declared
__basic_file(__basic_file&& __rv, __c_lock* __lock = 0) noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:88:7: error: expected ‘;’ at end of member declaration
sys_open(__c_file* __file, ios_base::openmode);
^~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:88:24: error: expected ‘)’ before ‘*’ token
sys_open(__c_file* __file, ios_base::openmode);
^
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:91:60: error: ‘std::__basic_file<char>* std::__basic_file<char>::sys_open(int, std::ios_base::openmode)’ conflicts with a previous declaration
sys_open(int __fd, ios_base::openmode __mode) throw ();
^
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:88:16: note: previous declaration ‘std::__basic_file<char>* std::__basic_file<char>::sys_open’
sys_open(__c_file* __file, ios_base::openmode);
^~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:102:21: error: ‘__c_file’ does not name a type; did you mean ‘__basic_file’?
_GLIBCXX_PURE __c_file*
^~~~~~~~
__basic_file
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h: In constructor ‘std::__basic_file<char>::__basic_file(std::__basic_file<char>&&, int*)’:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:67:9: error: class ‘std::__basic_file<char>’ does not have any field named ‘_M_cfile’
: _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created)
^~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:67:23: error: ‘class std::__basic_file<char>’ has no member named ‘_M_cfile’; did you mean ‘__basic_file’?
: _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created)
^~~~~~~~
__basic_file
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:69:7: error: ‘class std::__basic_file<char>’ has no member named ‘_M_cfile’; did you mean ‘__basic_file’?
__rv._M_cfile = nullptr;
^~~~~~~~
__basic_file
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h: In member function ‘void std::__basic_file<char>::swap(std::__basic_file<char>&)’:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:79:12: error: ‘_M_cfile’ was not declared in this scope
std::swap(_M_cfile, __f._M_cfile);
^~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:79:12: note: suggested alternative: ‘_Setfill’
std::swap(_M_cfile, __f._M_cfile);
^~~~~~~~
_Setfill
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/x86_64-pc-cygwin/bits/basic_file.h:79:26: error: ‘class std::__basic_file<char>’ has no member named ‘_M_cfile’; did you mean ‘__basic_file’?
std::swap(_M_cfile, __f._M_cfile);
^~~~~~~~
__basic_file
In file included from series.hh:36:0,
from match.cc:37:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/fstream: At global scope:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/fstream:107:7: error: ‘__c_lock’ does not name a type; did you mean ‘__c_locale’?
__c_lock _M_lock;
^~~~~~~~
__c_locale
In file included from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/fstream:1081:0,
from series.hh:36,
from match.cc:37:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc: In constructor ‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf()’:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc:80:43: error: class ‘std::basic_filebuf<_CharT, _Traits>’ does not have any field named ‘_M_lock’
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc:80:63: error: ‘_M_lock’ was not declared in this scope
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc:80:63: note: suggested alternative: ‘_M_seek’
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
_M_seek
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc: In constructor ‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf(std::basic_filebuf<_CharT, _Traits>&&)’:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc:97:5: error: class ‘std::basic_filebuf<_CharT, _Traits>’ does not have any field named ‘_M_lock’
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc:97:51: error: ‘_M_lock’ was not declared in this scope
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/fstream.tcc:97:51: note: suggested alternative: ‘_M_seek’
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
_M_seek
In file included from match.cc:37:0:
series.hh: At global scope:
series.hh:43:1: error: expected unqualified-id before string constant
"#include ""assert.h"""
^~~~~~~~~~~
series.hh:62:1: error: expected unqualified-id before string constant
" float x, y;"
^~~~~~~~~~~~~~~
series.hh:67:1: error: expected unqualified-id before string constant
"static float intervalmap(float i1b, float i1e, float i2b, "
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
series.hh:70:1: error: expected declaration before ‘}’ token
}
^
make: *** [Makefile:10: match.o] Error 1
What should I do?
Alp

Nodejs mongojs install error

I'm having some problems installing mongojs via npm. Whenever I try to install it (on windows 8) I just get a page full of red errors. There's so many of them that I don't even know where to begin, heres a sample of them (this is maybe 1/10 of total errors):
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(52): error C4430:
missing type specifier - int assumed. Note: C++ does not support default-int (
..\lib\win32\wrappers\security_credentials.cc) [C:\Users\Simon\AppData\Roaming\
npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerbe
ros.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(47): error C2039:
'HasInstance' : is not a member of 'v8::Persistent<v8::FunctionTemplate,v8::No
nCopyablePersistentTraits<T>>' [C:\Users\Simon\AppData\Roaming\npm\node_modules
\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(52): error C2143:
syntax error : missing ',' before '&' (..\lib\win32\wrappers\security_credenti
als.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\m
ongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(53): error C4430:
missing type specifier - int assumed. Note: C++ does not support default-int (
..\lib\win32\wrappers\security_credentials.cc) [C:\Users\Simon\AppData\Roaming\
npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerbe
ros.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(53): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(53): error C2143:
syntax error : missing ',' before '&' (..\lib\win32\wrappers\security_credenti
als.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\m
ongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(53): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(54): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(54): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(56): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(56): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(60): error C4430:
missing type specifier - int assumed. Note: C++ does not support default-int (
..\lib\win32\wrappers\security_credentials.cc) [C:\Users\Simon\AppData\Roaming\
npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\kerbe
ros.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(57): error C4430: mis
sing type specifier - int assumed. Note: C++ does not support default-int (..\l
ib\win32\kerberos.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\
node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(60): error C2143:
syntax error : missing ',' before '&' (..\lib\win32\wrappers\security_credenti
als.cc) [C:\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\m
ongodb\node_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(57): error C2143: syn
tax error : missing ',' before '&' (..\lib\win32\kerberos.cc) [C:\Users\Simon\A
ppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerbe
ros\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers/security_context.h(57): fatal error C100
3: error count exceeds 100; stopping compilation (..\lib\win32\kerberos.cc) [C:
\Users\Simon\AppData\Roaming\npm\node_modules\mongojs\node_modules\mongodb\node
_modules\kerberos\build\kerberos.vcxproj]
c:\users\simon\appdata\roaming\npm\node_modules\mongojs\node_modules\mongodb\no
de_modules\kerberos\lib\win32\wrappers\security_credentials.h(47): error C2819:
type 'v8::Persistent<v8::FunctionTemplate,v8::NonCopyablePersistentTraits<T>>'
does not have an overloaded member 'operator ->' [C:\Users\Simon\AppData\Roami
ng\npm\node_modules\mongojs\node_modules\mongodb\node_modules\kerberos\build\ke
rberos.vcxproj]
The same type of thing occurs when I try to install mongoose. mongodb native installed ok but had to install visual studio first to get that to work.
Can anyone explain what is going on here?
Not ideal, but I did a fresh reinstall of node and visual studio and things seem to work OK now

Undeclared Identifier: Probably a very simple fix

Language: Visual C++, MFC
I'm attempting to make an array of pointers to CString variables that I have declared in my header file. In general, this is what I'm doing:
CString *variableArray[5] = {
&var1
, &var2
, &var3
, &var4
, &var5
};
For whatever reason, though, I keep getting the following error:
Error 1 error C2065: 'var1' : undeclared identifier 18
Error 2 error C2065: 'var2' : undeclared identifier 19
Error 3 error C2065: 'var3' : undeclared identifier 20
Error 4 error C2065: 'var4' : undeclared identifier 21
Error 5 error C2065: 'var5' : undeclared identifier 22
I'm not quite sure I'm getting this error. To me knowledge, this is the correct way to make an array of pointers. Any help would be awesome!
EDIT: Here are the declarations in the header file:
public:
CString var1;
CString var2;
CString var3;
CString var4;
CString var5;
Where do you create "variableArray"? If it's in a static method or outside the scope of the class, it would make sense why you're getting that error.

Resources