Thursday, April 26, 2007

Compile maze client error

Recently, I reinstalled my Windows XP system because of virus. Then I installed the Borland C++ builder to compile and build maze client. However, error occurred during compiling.
Firstly, what should do is described here http://zhenhua-guo.blogspot.com/2006/12/compile-and-build-maze-client.html.
However, I don't know why the shellctrl component in C++ builder is different from my previous one. I used my previous shellctrl component because it worked well before I reinstalled my system.

When compiling, error occurred:
in crtdbg.h,
__inline int __ASSERTE_Helper(bool expr, char *file, int line){
TCHAR msg[256*2];
::wsprintf(msg, _T("%s failed - %s/%d"), expr, file, line);/* throw (msg); */
_ErrorExit(msg); return 0;
/* Never really gets here */}
error message: call to undefined function _T.

I searched the _T in BCB, I found that this is a macro which is defined in file tchar.h.
So I tried to add this line "#include " to file crtdbg.h and it worked.

However, another error occurred: unable to open file dclusr.lib.
In the "Lib" directory which is in the directory where you install BCB, there is a package called "dclusr.bpk". Then I compiled and installed this package.
After all, I can successfully compiled and built Maze client.

No comments: