title: Error when linking a program which uses ICU
body: <p>I have the following piece of code which uses ICU macros in order to determine UTF-8 string length:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdint.h&gt;
  #include &lt;unicode/utf.h&gt;
  
  size_t utf8_strlen( uint8_t* str, size_t length ) {
      int32_t i = 0;
      int32_t result = 0;
      UChar32 cur;
  
      while( i &lt; length ) {
          U8_NEXT( str, i, length, cur );
          if( cur &lt; 0 )
              return -1;
          result++;
      }
  
      return result;
  }
  </code></pre>
  
  <p>However, when compiling and linking it as</p>
  
  <pre><code>cc `icu-config --ldflags` test.c
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>/tmp/ccaVwSaO.o: In function `utf8_strlen':
  test.c:(.text+0x141): undefined reference to `utf8_nextCharSafeBody_48'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>The command above expands to <code>cc -ldl -lm -L/usr/lib -licui18n -licuuc -licudata -ldl -lm test.c</code>, and libicuuc does have <code>utf8_nextCharSafeBody_48</code> defined in it. Why does the linking error happen?</p>