[uClibc] uClibc, WCHAR, and id3lib

David Wuertele dave-gnus at bfnet.com
Tue Aug 19 04:34:37 UTC 2003


What is the status of g++ wchar support?

I'm trying to port id3lib to uClibc, but I'm seeing the following
error:

  ../src/.libs/libid3.so: undefined reference to `std::char_traits<wchar_t>::compare(wchar_t const*, wchar_t const*, unsigned)'
  ../src/.libs/libid3.so: undefined reference to `std::char_traits<wchar_t>::assign(wchar_t*, unsigned, wchar_t)'
  ../src/.libs/libid3.so: undefined reference to `std::char_traits<wchar_t>::copy(wchar_t*, wchar_t const*, unsigned)'
  ../src/.libs/libid3.so: undefined reference to `std::char_traits<wchar_t>::move(wchar_t*, wchar_t const*, unsigned)'

Googling about, I discovered this:

  http://gcc.gnu.org/ml/gcc-help/2002-10/msg00030.html

Apparently those same errors are caused when your g++ doesn't have
WCHAR support at all.  But I checked into uClibc/.config and found
that I have enabled it:

  UCLIBC_HAS_WCHAR=y

Next I tried compiling the web page's test app:

  #include <string>
  int main()
  {
    std :: wstring foo;
    return 0;
  }

...and I see these errors:

  $ ../staging_dir/bin/mipsel-uclibc-g++ test.cpp
  In file included from /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/memory:55,
                   from /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/string:48,
                   from test.cpp:1:
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/stl_alloc.h:382: error: parse
     error before `;' token
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/stl_alloc.h:452: error: syntax
     error before `<' token
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/stl_alloc.h:452: error: `
     __threads' was not declared in this scope
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/stl_alloc.h:452: error: `
     __inst' was not declared in this scope
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/stl_alloc.h:452: error: template
     argument 1 is invalid
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/stl_alloc.h:452: error: template
     argument 2 is invalid
  In file included from /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/string:53,
                   from test.cpp:1:
  /home/dave/C/perforce/source/deschutes/buildroot-M14.0-X225/build_mipsel/staging_dir/include/c++/bits/basic_string.h:166: error: '
     _Atomic_word' is used as a type, but is not defined as a type.
  test.cpp: In function `int main()':
  test.cpp:5: error: `wstring' undeclared in namespace `std'
  test.cpp:5: error: parse error before `;' token

Are wchar not supported yet for std?

Dave




More information about the uClibc mailing list