I'm trying to compile a Windows C++ program in g++. This is what I get.
/usr/include/c++/4.4/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
btree.cpp:1204: error: ‘_TCHAR’ has not been declared
btree.cpp: In function ‘int _tmain(int, int**)’:
btree.cpp:1218: error: ‘__int64’ was not declared in this scope
btree.cpp:1218: error: expected ‘;’ before ‘frequency’
btree.cpp:1220: error: ‘LARGE_INTEGER’ was not declared in this scope
btree.cpp:1220: error: expected primary-expression before ‘)’ token
btree.cpp:1220: error: ‘frequency’ was not declared in this scope
btree.cpp:1220: error: ‘QueryPerformanceFrequency’ was not declared in this scope
btree.cpp:1262: error: expected primary-expression before ‘)’ token
btree.cpp:1262: error: ‘start’ was not declared in this scope
btree.cpp:1262: error: ‘QueryPerformanceCounter’ was not declared in this scope
btree.cpp:1264: error: name lookup of ‘i’ changed for ISO ‘for’ scoping
btree.cpp:1264: note: (if you use ‘-fpermissive’ G++ will accept your code)
btree.cpp:1304: error: expected primary-expression before ‘)’ token
btree.cpp:1304: error: ‘end’ was not declared in this scope
btree.cpp:1306: error: ‘total’ was not declared in this scope
btree.cpp:1316: error: ‘getchar’ was not declared in this scope
The first thing I noticed is that there are these variable types called _TCHAR, _int64, and LARGE_INTEGER, which is probably a Windows thing. What can these be changed to so that they will work in g++?
Also, if there's anything else in here that you know can be converted to g++, that would be helpful.
I got the code from here: http://touc.org/btree.html