compiling glaurung questions
Posted: 15 Jul 2006, 10:45
1)When I try simply to compile a project from glaurung.h and
empty main.cpp that only has return 0 I get compilation warning and errors.
I can fix the problem simply by changing the lines with long long to int64 and deleting max and min that are not needed but my question is why the code of glaurung is not compatible with microsoft visual C++6?
The code is not only for linux but also for windows so I expected it to work.
typedef __int64 int64;
typedef unsigned __int64 uint64;
c:\glaurung\glaurung.h(246) : warning C4005: 'max' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\windef.h(177) : see previous definition of 'max'
c:\glaurung\glaurung.h(247) : warning C4005: 'min' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\windef.h(181) : see previous definition of 'min'
c:\glaurung\glaurung.h(302) : error C2632: 'long' followed by 'long' is illegal
c:\glaurung\glaurung.h(303) : error C2632: 'long' followed by 'long' is illegal
Error executing cl.exe.
main.obj - 2 error(s), 2 warning(s)
2)I made a new project with all the glaurung cpp files when only glaurung.h was changed not include min and max functions that are not needed when long long was replaced by __int64
I still get the following errors and warning and my question is how can I fix them.
Do I need a different compiler or maybe it is possible to make glaurung compatible to visuall C++6 by adding some
#if defined(C6) when I only need to add #define C6 to the code to make the code work?
Compiling...
book.cpp
d:\engines\glaurung12-src\src\book.cpp(15) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(15) : error C2146: syntax error : missing ')' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(15) : error C2059: syntax error : ')'
d:\engines\glaurung12-src\src\book.cpp(31) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(31) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(31) : error C2065: 'L' : undeclared identifier
d:\engines\glaurung12-src\src\book.cpp(33) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(33) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(64) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(64) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(69) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(69) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(79) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(79) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(86) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(86) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(89) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(89) : warning C4244: '=' : conversion from 'unsigned __int64' to 'int', possible loss of data
d:\engines\glaurung12-src\src\book.cpp(89) : error C2146: syntax error : missing ';' before identifier 'L'
data.cpp
endgame.cpp
eval.cpp
D:\engines\glaurung12-src\src\eval.cpp(54) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2059: syntax error : ')'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2143: syntax error : missing ';' before '{'
D:\engines\glaurung12-src\src\eval.cpp(68) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\eval.cpp(70) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\eval.cpp(70) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\eval.cpp(70) : error C2059: syntax error : ')'
extend.cpp
init.cpp
io.cpp
D:\engines\glaurung12-src\src\io.cpp(49) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\io.cpp(49) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\io.cpp(49) : error C2059: syntax error : ')'
learn.cpp
D:\engines\glaurung12-src\src\learn.cpp(47) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\learn.cpp(63) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\learn.cpp(76) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
main.cpp
mersenne.cpp
move.cpp
movegen.cpp
order.cpp
position.cpp
psq.cpp
pstruct.cpp
D:\engines\glaurung12-src\src\pstruct.cpp(91) : warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)
D:\engines\glaurung12-src\src\pstruct.cpp(102) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
root.cpp
D:\engines\glaurung12-src\src\root.cpp(92) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\root.cpp(92) : error C2146: syntax error : missing ';' before identifier 'L'
D:\engines\glaurung12-src\src\root.cpp(92) : error C2065: 'L' : undeclared identifier
safety.cpp
search.cpp
D:\engines\glaurung12-src\src\search.cpp(56) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\search.cpp(56) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\search.cpp(56) : error C2059: syntax error : ')'
see.cpp
smp.cpp
strcase.cpp
think.cpp
timeoday.cpp
tt.cpp
uci.cpp
ucioption.cpp
zobrist.cpp
D:\engines\glaurung12-src\src\zobrist.cpp(11) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\zobrist.cpp(11) : error C2146: syntax error : missing ';' before identifier 'L'
D:\engines\glaurung12-src\src\zobrist.cpp(11) : error C2065: 'L' : undeclared identifier
D:\engines\glaurung12-src\src\zobrist.cpp(18) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\zobrist.cpp(18) : error C2146: syntax error : missing ';' before identifier 'L'
D:\engines\glaurung12-src\src\zobrist.cpp(30) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\zobrist.cpp(30) : error C2146: syntax error : missing ';' before identifier 'L'
Error executing cl.exe.
glaurung12.exe - 42 error(s), 8 warning(s)
empty main.cpp that only has return 0 I get compilation warning and errors.
I can fix the problem simply by changing the lines with long long to int64 and deleting max and min that are not needed but my question is why the code of glaurung is not compatible with microsoft visual C++6?
The code is not only for linux but also for windows so I expected it to work.
typedef __int64 int64;
typedef unsigned __int64 uint64;
c:\glaurung\glaurung.h(246) : warning C4005: 'max' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\windef.h(177) : see previous definition of 'max'
c:\glaurung\glaurung.h(247) : warning C4005: 'min' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\windef.h(181) : see previous definition of 'min'
c:\glaurung\glaurung.h(302) : error C2632: 'long' followed by 'long' is illegal
c:\glaurung\glaurung.h(303) : error C2632: 'long' followed by 'long' is illegal
Error executing cl.exe.
main.obj - 2 error(s), 2 warning(s)
2)I made a new project with all the glaurung cpp files when only glaurung.h was changed not include min and max functions that are not needed when long long was replaced by __int64
I still get the following errors and warning and my question is how can I fix them.
Do I need a different compiler or maybe it is possible to make glaurung compatible to visuall C++6 by adding some
#if defined(C6) when I only need to add #define C6 to the code to make the code work?
Compiling...
book.cpp
d:\engines\glaurung12-src\src\book.cpp(15) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(15) : error C2146: syntax error : missing ')' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(15) : error C2059: syntax error : ')'
d:\engines\glaurung12-src\src\book.cpp(31) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(31) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(31) : error C2065: 'L' : undeclared identifier
d:\engines\glaurung12-src\src\book.cpp(33) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(33) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(64) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(64) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(69) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(69) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(79) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(79) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(86) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(86) : error C2146: syntax error : missing ';' before identifier 'L'
d:\engines\glaurung12-src\src\book.cpp(89) : error C2059: syntax error : 'bad suffix on number'
d:\engines\glaurung12-src\src\book.cpp(89) : warning C4244: '=' : conversion from 'unsigned __int64' to 'int', possible loss of data
d:\engines\glaurung12-src\src\book.cpp(89) : error C2146: syntax error : missing ';' before identifier 'L'
data.cpp
endgame.cpp
eval.cpp
D:\engines\glaurung12-src\src\eval.cpp(54) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2059: syntax error : ')'
D:\engines\glaurung12-src\src\eval.cpp(55) : error C2143: syntax error : missing ';' before '{'
D:\engines\glaurung12-src\src\eval.cpp(68) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\eval.cpp(70) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\eval.cpp(70) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\eval.cpp(70) : error C2059: syntax error : ')'
extend.cpp
init.cpp
io.cpp
D:\engines\glaurung12-src\src\io.cpp(49) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\io.cpp(49) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\io.cpp(49) : error C2059: syntax error : ')'
learn.cpp
D:\engines\glaurung12-src\src\learn.cpp(47) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\learn.cpp(63) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
D:\engines\glaurung12-src\src\learn.cpp(76) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'int', possible loss of data
main.cpp
mersenne.cpp
move.cpp
movegen.cpp
order.cpp
position.cpp
psq.cpp
pstruct.cpp
D:\engines\glaurung12-src\src\pstruct.cpp(91) : warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)
D:\engines\glaurung12-src\src\pstruct.cpp(102) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
root.cpp
D:\engines\glaurung12-src\src\root.cpp(92) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\root.cpp(92) : error C2146: syntax error : missing ';' before identifier 'L'
D:\engines\glaurung12-src\src\root.cpp(92) : error C2065: 'L' : undeclared identifier
safety.cpp
search.cpp
D:\engines\glaurung12-src\src\search.cpp(56) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\search.cpp(56) : error C2146: syntax error : missing ')' before identifier 'L'
D:\engines\glaurung12-src\src\search.cpp(56) : error C2059: syntax error : ')'
see.cpp
smp.cpp
strcase.cpp
think.cpp
timeoday.cpp
tt.cpp
uci.cpp
ucioption.cpp
zobrist.cpp
D:\engines\glaurung12-src\src\zobrist.cpp(11) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\zobrist.cpp(11) : error C2146: syntax error : missing ';' before identifier 'L'
D:\engines\glaurung12-src\src\zobrist.cpp(11) : error C2065: 'L' : undeclared identifier
D:\engines\glaurung12-src\src\zobrist.cpp(18) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\zobrist.cpp(18) : error C2146: syntax error : missing ';' before identifier 'L'
D:\engines\glaurung12-src\src\zobrist.cpp(30) : error C2059: syntax error : 'bad suffix on number'
D:\engines\glaurung12-src\src\zobrist.cpp(30) : error C2146: syntax error : missing ';' before identifier 'L'
Error executing cl.exe.
glaurung12.exe - 42 error(s), 8 warning(s)