Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6170623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:04:14+00:00 2026-05-23T23:04:14+00:00

I am going to use ICU4C unicode library with version 4.2.1 (the version which

  • 0

I am going to use ICU4C unicode library with version 4.2.1 (the version which is packaged in Ubuntu 10.04). I made a simple test code; just opening a regular expression object.

#include <stdio.h>  
#include <unicode/utypes.h>
#include <unicode/uregex.h>

int main() {
    UChar zPattern[4] = {'a', 'b', 'c', 0};
    UErrorCode status = 0;
    URegularExpression *pExpr = uregex_open(zPattern, -1, 0, 0, &status);
    return status;
};

I compiled with dynamically-linked icu library and ran, like below:

gcc -o test.out test.c -licui18n -licuuc -licudata -lpthread -lm
./test.out

and the result status code was ‘0’. worked like a charm.

Now I decided to link icu library statically like below, and ran

gcc -o test.out -DU_STATIC_IMPLEMENTATION test.c -lsicui18n -lsicuuc -lsicudata -lpthread -lstdc++ -lm
./test.out

and the result status code was ‘1’. uregex_open function failed with the status code ‘U_ILLEGAL_ARGUMENT_ERROR’.

Did I missed something to link ICU4C statically?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:04:14+00:00Added an answer on May 23, 2026 at 11:04 pm

    Check the libsicudata you ended up hitting- it’s probably the ‘stub’ one. If you want ICU’s data to be loaded as a static library, it should be a several-meg libicusdata.

    To debug ICU loading issues, call u_init(&status) first, that will see if ICU can load its data. I don’t know how ubuntu builds ICU, maybe the data is loaded in a different way (such as from a file).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just going to use the FileUpload.FileBytes property but looking into the respective
I've got a bunch of properties which I am going to use read/write locks
I'm going to use 'prepopulated_fields' at Django admin to get a YouTube embed code
I am going to use this client library: https://github.com/ezmobius/redis-rb In the github page, it
I'm going to use the sample code from http://gettinggeneticsdone.blogspot.com/2009/11/split-apply-and-combine-in-r-using-plyr.html for this example. So, first,
So I got a remote API specification which I am going to use to
I was going to use the Polymaps.org library (combined with Protovis) to create a
I was going to use the following line of code: [[NSSortDescriptor alloc] initWithKey:@title ascending:YES
I'm going to use System.DirectoryServices to programatically add a wildcard filter for IIS (Version
I am going to use Git version control by IntelliJ Community Edition in order

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.