title: Can't compile with ICU library - undefined reference to 'u_strlen_3_6'
body: <p>Trying to get the ICU library to work with my C-program, so I can lowercase UTF-8 strings. Here's a minimum example that will reproduce the compile error:</p>
  
  <p><strong>main.c</strong></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;unicode/ustring.h&gt;
  
  int main(int argc, char **argv)
  {
    UChar test[100] = { 0x41, 0x42, 0x43, 0x20, 0xc6, 0xd8, 0xc5, 0x20, 0xc9, 0x20, 0xc8, 0x20, 0xd1, 0x20, 0xca, 0x20, 0xd6 };
    for (int i = 0; i &lt; u_strlen(test); i++){
      printf("%d\n", i);
    }
  }
  </code></pre>
  
  <p><strong>Makefile</strong></p>
  
  <pre><code>CC = gcc
  CFLAGS = -g -O3 -std=c99
  GNUCFLAGS = -g -O3 -std=gnu99 -lm
  
  main: obj/main.o
      $(CC) $(CFLAGS) -o bin/main obj/main.o
  
  obj/main.o: src/main.c
      $(CC) $(CFLAGS) -c src/main.c -o obj/main.o
  </code></pre>
  
  <p><strong>Compiler output</strong></p>
  
  <pre><code>gcc -g -O3 -std=c99 -o bin/main obj/main.o
  obj/main.o: In function `main':
  ~/src/main.c:9: undefined reference to `u_strlen_3_6'
  collect2: error: ld returned 1 exit status
  Makefile:6: recipe for target 'main' failed
  make: *** [main] Error 1
  </code></pre>
  
  <p>I've tried including ALL the header files listed at <a href="http://icu-project.org/apiref/icu4c/" rel="nofollow">http://icu-project.org/apiref/icu4c/</a> with no luck. Also tried adding <code>-licudata -licui18n -licuio -liculx -licutest -licutu -licuuc</code> to Makefile - same error.</p>
  
  <p>I'm on Debian GNU/Linux 8.5 (jessie) and the following packages are installed:</p>
  
  <ul>
  <li>libicu52</li>
  <li>libicu52-dbg</li>
  <li>libicu-dev</li>
  <li>icu-devtools</li>
  </ul>
  
  <p>Any suggestions?</p>