YoungJun Kim
07-03-2007, 09:38 PM
I tried to use NR codes and successfully tested in a 'new project' in Microsoft Visual C++ 6.0.
But when I include "nr.h" in my program source to use NR module, it gives out lots of compile errors.
If anyone who have encountered and solved the problems like mine, please let me know the tips.
Thank you in advance.
My compile errors are as follows:
d:\project\enb\nr\other\nrutil_nr.h(12) : error C2059: syntax error : 'function-style cast'
d:\project\enb\nr\other\nrutil_nr.h(15) : error C2062: type 'const int' unexpected
d:\project\enb\nr\other\nrutil_nr.h(15) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(16) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(16) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(18) : error C2062: type 'const double' unexpected
d:\project\enb\nr\other\nrutil_nr.h(18) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(18) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(19) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(19) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(21) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(21) : error C2062: type 'const double' unexpected
d:\project\enb\nr\other\nrutil_nr.h(21) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(22) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(22) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(24) : error C2954: template definitions cannot nest
d:\project\enb\nr\other\nrutil_nr.h(25) : error C2059: syntax error : 'function-style cast'
d:\project\enb\nr\other\nrutil_nr.h(25) : error C2226: syntax error : unexpected type 'T'
d:\project\enb\nr\other\nrutil_nr.h(25) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(28) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(28) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(29) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(29) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(31) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(31) : error C2062: type 'const double' unexpected
d:\project\enb\nr\other\nrutil_nr.h(31) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(32) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(32) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(34) : error C2954: template definitions cannot nest
d:\project\enb\nr\other\nrutil_nr.h(52) : error C2872: 'cerr' : ambiguous symbol
d:\project\enb\nr\other\nrutil_nr.h(53) : error C2872: 'cerr' : ambiguous symbol
d:\project\enb\nr\other\nrutil_nr.h(53) : error C2678: binary '<<' : no operator defined which takes a left-hand operand of type 'class ostream_withassign' (or there is no acceptable conversion)
d:\project\enb\nr\other\nrutil_nr.h(54) : error C2872: 'cerr' : ambiguous symbol
Error executing cl.exe.
EnB_debug.exe - 33 error(s), 0 warning(s)
But when I include "nr.h" in my program source to use NR module, it gives out lots of compile errors.
If anyone who have encountered and solved the problems like mine, please let me know the tips.
Thank you in advance.
My compile errors are as follows:
d:\project\enb\nr\other\nrutil_nr.h(12) : error C2059: syntax error : 'function-style cast'
d:\project\enb\nr\other\nrutil_nr.h(15) : error C2062: type 'const int' unexpected
d:\project\enb\nr\other\nrutil_nr.h(15) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(16) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(16) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(18) : error C2062: type 'const double' unexpected
d:\project\enb\nr\other\nrutil_nr.h(18) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(18) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(19) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(19) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(21) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(21) : error C2062: type 'const double' unexpected
d:\project\enb\nr\other\nrutil_nr.h(21) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(22) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(22) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(24) : error C2954: template definitions cannot nest
d:\project\enb\nr\other\nrutil_nr.h(25) : error C2059: syntax error : 'function-style cast'
d:\project\enb\nr\other\nrutil_nr.h(25) : error C2226: syntax error : unexpected type 'T'
d:\project\enb\nr\other\nrutil_nr.h(25) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(28) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(28) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(29) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(29) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(31) : error C2062: type 'const float' unexpected
d:\project\enb\nr\other\nrutil_nr.h(31) : error C2062: type 'const double' unexpected
d:\project\enb\nr\other\nrutil_nr.h(31) : error C2059: syntax error : ')'
d:\project\enb\nr\other\nrutil_nr.h(32) : error C2143: syntax error : missing ';' before '{'
d:\project\enb\nr\other\nrutil_nr.h(32) : error C2447: missing function header (old-style formal list?)
d:\project\enb\nr\other\nrutil_nr.h(34) : error C2954: template definitions cannot nest
d:\project\enb\nr\other\nrutil_nr.h(52) : error C2872: 'cerr' : ambiguous symbol
d:\project\enb\nr\other\nrutil_nr.h(53) : error C2872: 'cerr' : ambiguous symbol
d:\project\enb\nr\other\nrutil_nr.h(53) : error C2678: binary '<<' : no operator defined which takes a left-hand operand of type 'class ostream_withassign' (or there is no acceptable conversion)
d:\project\enb\nr\other\nrutil_nr.h(54) : error C2872: 'cerr' : ambiguous symbol
Error executing cl.exe.
EnB_debug.exe - 33 error(s), 0 warning(s)