I notice that your g++ line is not pointing to /usr/local/lib/libicuuc.a where you say you installed icu. It obviously is compiling against the headers OK, but does the static library exist in the path you are using ("/home/user/myProject/icu/libicuuc.a")?
./runConfigureICU Linux --enable-static --disable-shared --disable-renaming
did you heed the warning?:
*** WARNING: You must set the following flags before code compiled against this ICU will function properly:
The recommended way to do this is to prepend the following lines to source/common/unicode/uconfig.h or #include them near the top of that file.
/* -DU_DISABLE_RENAMING=1 */
#define U_DISABLE_RENAMING 1
If not, then do so now.
Next, modify your test program to #include <unicode/uconfig.h> before anything else,
You can if you wish ensure that boilerplate headers like unicode/uconfig.h
and unicode/platform.h are automatically included by the the compiler before
anything else by making use of a pre-include header, e.g.
// pre-include header for icu
which you pass to GCC or clang with the option:
You can put this option in your CPPFLAGS if you use a make-based build system.
In the case of the toy program above it is enough just to define U_DISABLE_RENAMING=1 on the commandline, without including <unicode/uconfig.h>