http://apps.icu-project.org/icu-jsp/downloadPage.jsp?ver=4.4.1&base=c
http://site.icu-project.org/download/48
#8535 & #8537 (C only) Prebuilt binaries are usable on MinGW but the MinGW build is broken
http://site.icu-project.org/download/49#TOC-ICU4C-Download
get icu4c-4_4_2-src.zip
http://qt-project.org/wiki/Compiling-ICU-with-MinGW
bash.exe"-3.1$ ./runConfigureICU MinGW --prefix=$PWD/../dist
runConfigureICU: unrecognized platform "MinGW" (use --help for help)
c:\msys\bin\bash.exe
copy from icu4c-49_1_2-src.zip\runConfigureICU
MinGW Use the GNU gcc/g++ compilers on MinGW
MinGW)
THE_OS="MinGW"
THE_COMP="the GNU C++"
RELEASE_CFLAGS='-O3'
RELEASE_CXXFLAGS='-O3'
;;
ICU for C/C++ 4.4.2 is ready to be built.
=== Important Notes: ===
Data Packaging: library
This means: ICU data will be linked with ICU. A shared data library will be built.
To locate data: ICU will use the linked data library. If linked with the stub library located in st
ubdata/, the application can use udata_setCommonData() or set a data path to override.
Building ICU: Use a GNU make such as make to build ICU.
checking the version of "make"... 3.81 (we wanted at least 3.80)
ok
If the result of the above commands looks okay to you, go to the directory
source in the ICU distribution to build ICU. Please remember that ICU needs
GNU make to build properly...
export PATH=/c/msys/bin:$PATH
make CPPFLAGS=-D__MSVCRT__
make:
cd .. \
&& CONFIG_FILES=common/Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating common/Makefile
make[1]: Leaving directory `/d/1/icu4c-4_4_2-src/icu/source/common'
make[1]: Entering directory `/d/1/icu4c-4_4_2-src/icu/source/common'
g++ -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -
DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strin
gs -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o errorcode.o errorcode.cpp
In file included from unicode/errorcode.h:27:0,
from errorcode.cpp:18:
./unicode/uobject.h:120:55: error: 'operator new' takes type 'size_t' ('unsigned int') as first para
meter [-fpermissive]
./unicode/uobject.h:127:57: error: 'operator new' takes type 'size_t' ('unsigned int') as first para
meter [-fpermissive]
./unicode/uobject.h:152:68: error: 'operator new' takes type 'size_t' ('unsigned int') as first para
meter [-fpermissive]
make[1]: *** [errorcode.o] Error 1
make[1]: Leaving directory `/d/1/icu4c-4_4_2-src/icu/source/common'
make: *** [all-recursive] Error 2
install a new mingw
gcc -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o putil.o putil.c
putil.c:604:12: error: '_timezone' undeclared (first use in this function)
C:\MinGW-4.6.1\include\time.h
__MINGW_IMPORT long _timezone;
__MINGW_IMPORT char *_tzname[2];
gcc -D__MSVCRT__ -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o putil.o putil.c
loclikely.cpp:1050:18: error: '::_strnicmp' has not been declared
#include <string.h>
g++ -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -D__cplusplus -D__MSVCRT__ -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o loclikely.o loclikely.cpp
extern "C" _CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp (const char*, const char*, size_t);
locdispnames.cpp:769:8: error: '::_stricmp' has not been declared
calendar.cpp:178:13: error: '::_stricmp' has not been declared
uconv.cpp:183:14: error: '::_stricmp' has not been declared
extern "C" _CRTIMP int __cdecl __MINGW_NOTHROW _stricmp (const char*, const char*);
gcc -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -D__MSVCRT__ -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o wintz.o wintz1.c
wintz.c:116:1: error: expected expression before '/' token
delete the comment
// to bring it inline with the enum
// return winType+1;
D:\1\icu4c-4_4_2-src\icu\source\common\unicode\platform.h
/* U_CALLCONV is releated to U_EXPORT2 */
#define U_EXPORT2
D:\1\icu4c-4_4_2-src\icu\source\common\unicode\utypes.h
#define U_I18N_API U_IMPORT
D:\1\icu4c-4_4_2-src\icu\source\i18n\unicode\regex.h
try:
#define U_I18N_API __declspec(dllexport)
the same. and the dll is working.
Reading makefile `../icudefs.local' (search path) (don't care) (no ~ expansion)...
make stops here.
in d:\1\icu4c-4_4_2-src\icu\source\icudefs.mk, comment:
#-include $(top_builddir)/icudefs.local
not working. but use mingw32-make instead, it's working.
make -d
-d Print lots of debugging information.
http://site.icu-project.org/download/48
#8535 & #8537 (C only) Prebuilt binaries are usable on MinGW but the MinGW build is broken
http://site.icu-project.org/download/49#TOC-ICU4C-Download
get icu4c-4_4_2-src.zip
http://qt-project.org/wiki/Compiling-ICU-with-MinGW
bash.exe"-3.1$ ./runConfigureICU MinGW --prefix=$PWD/../dist
runConfigureICU: unrecognized platform "MinGW" (use --help for help)
c:\msys\bin\bash.exe
copy from icu4c-49_1_2-src.zip\runConfigureICU
MinGW Use the GNU gcc/g++ compilers on MinGW
MinGW)
THE_OS="MinGW"
THE_COMP="the GNU C++"
RELEASE_CFLAGS='-O3'
RELEASE_CXXFLAGS='-O3'
;;
ICU for C/C++ 4.4.2 is ready to be built.
=== Important Notes: ===
Data Packaging: library
This means: ICU data will be linked with ICU. A shared data library will be built.
To locate data: ICU will use the linked data library. If linked with the stub library located in st
ubdata/, the application can use udata_setCommonData() or set a data path to override.
Building ICU: Use a GNU make such as make to build ICU.
checking the version of "make"... 3.81 (we wanted at least 3.80)
ok
If the result of the above commands looks okay to you, go to the directory
source in the ICU distribution to build ICU. Please remember that ICU needs
GNU make to build properly...
export PATH=/c/msys/bin:$PATH
make CPPFLAGS=-D__MSVCRT__
make:
cd .. \
&& CONFIG_FILES=common/Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating common/Makefile
make[1]: Leaving directory `/d/1/icu4c-4_4_2-src/icu/source/common'
make[1]: Entering directory `/d/1/icu4c-4_4_2-src/icu/source/common'
g++ -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -
DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strin
gs -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o errorcode.o errorcode.cpp
In file included from unicode/errorcode.h:27:0,
from errorcode.cpp:18:
./unicode/uobject.h:120:55: error: 'operator new' takes type 'size_t' ('unsigned int') as first para
meter [-fpermissive]
./unicode/uobject.h:127:57: error: 'operator new' takes type 'size_t' ('unsigned int') as first para
meter [-fpermissive]
./unicode/uobject.h:152:68: error: 'operator new' takes type 'size_t' ('unsigned int') as first para
meter [-fpermissive]
make[1]: *** [errorcode.o] Error 1
make[1]: Leaving directory `/d/1/icu4c-4_4_2-src/icu/source/common'
make: *** [all-recursive] Error 2
install a new mingw
gcc -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o putil.o putil.c
putil.c:604:12: error: '_timezone' undeclared (first use in this function)
C:\MinGW-4.6.1\include\time.h
__MINGW_IMPORT long _timezone;
__MINGW_IMPORT char *_tzname[2];
gcc -D__MSVCRT__ -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o putil.o putil.c
loclikely.cpp:1050:18: error: '::_strnicmp' has not been declared
#include <string.h>
g++ -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -D__cplusplus -D__MSVCRT__ -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o loclikely.o loclikely.cpp
extern "C" _CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp (const char*, const char*, size_t);
locdispnames.cpp:769:8: error: '::_stricmp' has not been declared
calendar.cpp:178:13: error: '::_stricmp' has not been declared
uconv.cpp:183:14: error: '::_stricmp' has not been declared
extern "C" _CRTIMP int __cdecl __MINGW_NOTHROW _stricmp (const char*, const char*);
gcc -I. -I../i18n "-DDEFAULT_ICU_PLUGINS=\"/d/1/icu4c-4_4_2-src/icu/source/../dist/lib/icu\" " -D__MSVCRT__ -DU_COMMON_IMPLEMENTATION -DHAVE_CONFIG_H -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -mthreads -fvisibility=hidden -c -DPIC -o wintz.o wintz1.c
wintz.c:116:1: error: expected expression before '/' token
delete the comment
// to bring it inline with the enum
// return winType+1;
D:\1\icu4c-4_4_2-src\icu\source\common\unicode\platform.h
/* U_CALLCONV is releated to U_EXPORT2 */
#define U_EXPORT2
D:\1\icu4c-4_4_2-src\icu\source\common\unicode\utypes.h
#define U_I18N_API U_IMPORT
D:\1\icu4c-4_4_2-src\icu\source\i18n\unicode\regex.h
try:
#define U_I18N_API __declspec(dllexport)
the same. and the dll is working.
Reading makefile `../icudefs.local' (search path) (don't care) (no ~ expansion)...
make stops here.
in d:\1\icu4c-4_4_2-src\icu\source\icudefs.mk, comment:
#-include $(top_builddir)/icudefs.local
not working. but use mingw32-make instead, it's working.
make -d
-d Print lots of debugging information.