If you want to override ICU's memory allocators, you should consider using =
the u=5FsetMemoryFunctions() function instead of modifying ICU.
George Rhoten
IBM Globalization Center of Competency/ICU San Jos=E9, CA, USA
http://www.icu-project.org/
http://icu.sourceforge.net/
"Doug Hockin" <dhockin@...
Sent by: icu-support-bounces@...
11/09/2006 06:36 PM
Please respond to
ICU support mailing list <icu-support@...>
To
"ICU support mailing list" <icu-support@...>
cc
Subject
[icu-support] Error compiling ICU4C 3.6 on Windows XP with Visual Studio=20
2005
I'm attempting to build ICU C 3.6 on Windows XP using Visual Studio
2005.
The only error I get is when "makedata" is built (see traceback below).
Everything is stock except that I have changed the heap control defines
in=20
pwin32.h and uobject.h because we use the SmartHeap memory allocator and
want everything allocated on it's heap.
-- Doug
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
pwin32.h
/* Determine whether to override new and delete. */
#ifndef U=5FOVERRIDE=5FCXX=5FALLOCATION
//#define U=5FOVERRIDE=5FCXX=5FALLOCATION 1
#define U=5FOVERRIDE=5FCXX=5FALLOCATION 0
#endif
/* Determine whether to override placement new and delete for STL. */
#ifndef U=5FHAVE=5FPLACEMENT=5FNEW
//#define U=5FHAVE=5FPLACEMENT=5FNEW 1
#define U=5FHAVE=5FPLACEMENT=5FNEW 0
#endif
/* Determine whether to override new and delete for MFC. */
#if !defined(U=5FHAVE=5FDEBUG=5FLOCATION=5FNEW) && defined(=5FMSC=5FVER)
//#define U=5FHAVE=5FDEBUG=5FLOCATION=5FNEW 1
#define U=5FHAVE=5FDEBUG=5FLOCATION=5FNEW 0
#endif
--------
uobject.h
/** U=5FOVERRIDE=5FCXX=5FALLOCATION - Define this to override operator new
and
* delete in UMemory. Enabled by default
for ICU.
*
* Enabling forces all allocation of ICU object types to use
ICU's
* memory allocation. On Windows, this allows the ICU DLL to be
used by
* applications that statically link the C Runtime library,
meaning that
* the app and ICU will be using different heaps.
*
* @stable ICU 2.2
*/=20
#ifndef U=5FOVERRIDE=5FCXX=5FALLOCATION
//#define U=5FOVERRIDE=5FCXX=5FALLOCATION 1
#define U=5FOVERRIDE=5FCXX=5FALLOCATION 0
#endif
/** U=5FHAVE=5FPLACEMENT=5FNEW - Define this to define the placement new a=
nd
* delete in UMemory for STL.
*
* @stable ICU 2.6
*/=20
#ifndef U=5FHAVE=5FPLACEMENT=5FNEW
//#define U=5FHAVE=5FPLACEMENT=5FNEW 1
#define U=5FHAVE=5FPLACEMENT=5FNEW 0
#endif
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
When building an exception happens that looks like this:
An unhandled win32 exception occurred in genrb.exe [24064].
/**
* Global operator new[], defined only inside ICU4C, must not be used.
* Crashes intentionally.
* @internal
*/
inline void *
operator new[](size=5Ft /*size*/) {
char *q=3DNULL;
> *q=3D5; /* break it */
return q;
}
> icuuc36d.dll!operator new[](unsigned int =5F=5Fformal=3D68=
)=20
Line 514
+ 0x3 bytes C++
icuuc36d.dll!icu=5F3=5F6::CanonicalIterator::setSource(con=
st
icu=5F3=5F6::UnicodeString & newSource=3D{...}, UErrorCode &
status=3DU=5FZERO=5FERROR) Line 199 + 0x39 bytes C++
icuuc36d.dll!icu=5F3=5F6::CanonicalIterator::CanonicalIterator(const
icu=5F3=5F6::UnicodeString & sourceStr=3D{...}, UErrorCode &
status=3DU=5FZERO=5FERROR) Line 76 C++
icuin36d.dll!uprv=5Fuca=5FaddAnElement=5F3=5F6(tempUCATabl=
e *
t=3D0x006c0f60, UCAElements * element=3D0x0012cc40, UErrorCode *
status=3D0x0012e53c) Line 1169 + 0x16 bytes C++
icuin36d.dll!ucol=5FcreateElements=5F3=5F6(UColTokenParser=
*
src=3D0x0012e364, tempUCATable * t=3D0x006c0f60, UColTokListHeader *
lh=3D0x00686710, UErrorCode * status=3D0x0012e53c) Line 923 + 0x14 bytes
C++
icuin36d.dll!ucol=5FassembleTailoringTable=5F3=5F6(UColTokenParser *
src=3D0x0012e364, UErrorCode * status=3D0x0012e53c) Line 1134 + 0x21 bytes
C++
icuin36d.dll!ucol=5FopenRules=5F3=5F6(const wchar=5Ft *
rules=3D0x0038f590, int rulesLength=3D112, UColAttributeValue
normalizationMode=3DUCOL=5FSTRENGTH=5FLIMIT, UColAttributeValue
strength=3DUCOL=5FTERTIARY, UParseError * parseError=3D0x0012e4c8, UErrorCo=
de
* status=3D0x0012e53c) Line 296 + 0xd bytes C++
genrb.exe!addCollation(SResource * result=3D0x0038f3c0,=20
unsigned
int startline=3D92, int * status=3D0x0012ff60) Line 715 + 0x25 bytes
C
genrb.exe!parseCollationElements(char * tag=3D0x0012f668, =
unsigned
int startline=3D92, char newCollation=3D'=01', int * status=3D0x0012ff60) =
Line
865 + 0x19 bytes C
genrb.exe!parseTable(char * tag=3D0x0012f668, unsigned int
startline=3D92, const UString * comment=3D0x0012fa7c, int *
status=3D0x0012ff60) Line 1003 + 0x13 bytes C
genrb.exe!parseResource(char * tag=3D0x0012f668, const=20
UString *
comment=3D0x0012fa7c, int * status=3D0x0012ff60) Line 1799 + 0x15 bytes
C
genrb.exe!realParseTable(SResource * table=3D0x003839e0,=20
char *
tag=3D0x00000000, unsigned int startline=3D12, int * status=3D0x0012ff60)
Line 966 + 0x14 bytes C
genrb.exe!parse(UCHARBUF * buf=3D0x00383218, const char *
inputDir=3D0x00383022, const char * outputDir=3D0x00383026, int *
status=3D0x0012ff60) Line 1890 + 0x19 bytes C
genrb.exe!processFile(const char * filename=3D0x0038305f, =
const
char * cp=3D0x00000000, const char * inputDir=3D0x00383022, const char *
outputDir=3D0x00383026, const char * packageName=3D0x00000000, int *
status=3D0x0012ff60) Line 367 + 0x15 bytes C
genrb.exe!main(int argc=3D8, char * * argv=3D0x00382fb0) L=
ine=20
252 +
0x20 bytes C
genrb.exe!=5F=5FtmainCRTStartup() Line 586 + 0x19 bytes C
genrb.exe!mainCRTStartup() Line 403 C
kernel32.dll!7c816fd7()=20
[Frames below may be incorrect and/or missing, no symbols =
loaded
for kernel32.dll]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job=20
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
icu-support mailing list - icu-support@...
To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support
|