我下载了那个BCB整多线程例子,用bcb6编译,通不过,帮我看看谢谢
我下载了那个BCB整多线程例子,用bcb6编译,通不过。
错误信息是:
[C++ Warning] _prolog.h(47): W8059 Structure packing size has changed
[C++ Warning] _prolog.h(19): W8059 Structure packing size has changed
[C++ Warning] _epilog.h(32): W8059 Structure packing size has changed
[C++ Warning] _epilog.h(3: W8059 Structure packing size has changed
[C++ Error] SynchedThreads.cpp(63): E2268 Call to undefined function 'assert'
[C++ Error] SynchedThreads.cpp(100): E2268 Call to undefined function 'assert'
[C++ Error] SynchedThreads.cpp(128): E2268 Call to undefined function 'assert'
===========
其中,
[C++ Warning] _prolog.h(47): W8059 Structure packing size has changed
对应的是:
#if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)
# if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
# pragma warning(push)
# endif
# if defined (__BORLANDC__)
# pragma option push -Vx- -Ve- -a8 -b -pc -w-inl -w-aus -w-sig -w-8062 -w-8041 -w-8008 -w-8012 -w-8027 -w-8057 -w-8091 -w-8092 -w-8066 /* P_O_1 */
//# pragma option push -w-inl -w-aus -w-sig -w-8062 -w-8041 -w-8008 -w-8012 -w-8027 -w-8057 -w-8091 -w-8092 /* P_O_1 */
# else
# include <config/_msvc_warnings_off.h>
# endif
#elif defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#pragma set woff 1209
#pragma set woff 1174
#pragma set woff 1375
// from iterator_base.h
#pragma set woff 1183
#elif defined(__DECCXX)
# ifdef __PRAGMA_ENVIRONMENT
# pragma __environment __save
# pragma __environment __header_defaults
# endif
#elif defined(__IBMCPP__)
// supress EDC3130: A constant is being used as a conditional expression
#pragma info(nocnd)
#elif defined (__HP_aCC)
/* _REENTRANT selects Posix 1c threads unless draft4 selected.
* * This usage is obsolescent, "-D_POSIX_C_SOURCE=199506" is preferred */
# if 0 /* defined (_REENTRANT) && ! defined (_POSIX_C_SOURCE) */
# define _POSIX_C_SOURCE 199506
# endif
#elif defined (__WATCOMCPLUSPLUS__)
# pragma warning 604 10 // must lookahead to determine...
# pragma warning 594 10 // resolved as declaration/type
# pragma warning 595 10 // resolved as an expression
#endif
==============
[C++ Error] SynchedThreads.cpp(100): E2268 Call to undefined function 'assert'
对应的是:
TStopStartThread::TStopStartThread()
: TSimpleThread((TThreadFunction) NULL, NULL, false)
{
Event = CreateEvent(NULL, true, false, NULL);
// API call is smaller and simpler than VCL wrapper
assert(Event != NULL);
Waiting = Aborted = false;
} // TStopStartThread::TStopStartThread
=================
如何理解和解决?谢谢
那个例子的下载地址在:
http://www.ccrun.com/sour/