From: Steven R. L. <sr...@ic...> - 2010-05-24 18:21:34
|
The header urename.h redefines all symbols (by default) to have the version number attached. Can you run "nm" on your .o file vs. the ICU library (libicuuc.a etc) ? also could there be an ICU in /usr/include || /usr/lib which is being picked up instead? -s Dave Mateer wrote: > I am not able to compile an application using the ICU library. I'm a newbie, so it's probably something simple, but I have not had any success so far. I'm also relatively new to C++ (from the .Net world, and the whole library thing is still not entirely clear. I'd appreciate any help. > > What I've done so far: > > I downloaded the ICU source and created a subdirectory "build-dev". From there, I ran these commands to compile the library: > > env CPPFLAGS=-DU_USING_ICU_NAMESPACE=0 ../source/runConfigureICU Linux --with-data-packaging=archive --enable-static --disable-shared > make > > Everything seems fine. > > I then created a Qt static library which uses ICU. Some relevant portions: > > #include <unicode/regex.h> > #include <unicode/unistr.h> > > const QSet<QString> literacy::GetUniqueLetters(const QMap<QString, int> &wordCounts) > { > UErrorCode err; > icu_44::RegexMatcher graphemeMatcher("\\P{M}\\p{M}", 0, err); > ... > } > > I compile this, adding to the INCLUDEPATH to point to the ICU stuff: > INCLUDEPATH += ../../third_party/icu/source/i18n \ > ../../third_party/icu/source/common \ > ../../third_party/icu/build-dev/common > > That also compiles fine. > > However, when I include this Qt static library in an application, I get compile errors. > > I am adding to LIBS to point to the ICU libraries: > > LIBS += -L../ClassLibrary -lClassLibrary \ > -L../../third_party/gtest/build-dev -lgtest \ > -L../../third_party/icu/build-dev/lib -licuuc -licui18n > > But I am getting errors like this: > ../../third_party/icu/build-dev/lib/libicui18n.a(rematch.ao): In function `icu_44::RegexMatcher::reset(int, UErrorCode&)': > rematch.cpp:(.text+0x569): undefined reference to `utext_next32_44' > rematch.cpp:(.text+0x59c): undefined reference to `utext_setNativeIndex_44' > > (There are 680 total errors.) > > Looking through the source, I don't see any functions defined with _44--where is that coming from? Is that correct? What library do I need to include? > > Any help would be greatly appreciated! > > Dave > ------------------------------------------------------------------------------ > > _______________________________________________ > icu-support mailing list - icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support > -- Steven R. Loomis sr...@ic... Technical Lead, ICU for C/C++ <http://icu-project.org> IBM San José Globalization Center of Competency <http://ibm.com/software/globalization> |