Note that there are some explanatory texts on larger screens.

plurals
  1. POICU problems compiling with Boost 1.50 locale in Linux
    primarykey
    data
    text
    <p>So, I am having trouble compiling my project that is using boost 1.50.0 libraries, more specifically the boost 'locale' library. I am receiving this error when I compile:</p> <pre><code>(.text._ZN5boost6locale8impl_icu10num_formatIcED2Ev[_ZN5boost6locale8impl_icu10num_formatIcED5Ev]+0x20):-1: error: undefined reference to `icu_48::Locale::~Locale()' </code></pre> <p>My immediate assumption was that I was not linking the libicu-dev libraries in the project correctly, and added the library to my cmake files (FindICU.cmake).</p> <p><strong>FindICU.cmake:</strong></p> <pre><code># Try to find the ICU library # ICU_FOUND - system has ICU # ICU_INCLUDE_DIR - the ICU include directory # ICU_LIBRARY - the ICU library FIND_PATH(ICU_INCLUDE_DIR NAMES utf8.h utypes.h PATH_SUFFIXES unicode) SET(_ICUI18N_STATIC_LIBS libicui18n.a) SET(_ICUI18N_SHARED_LIBS libicui18n.dll.a icui18n) SET(_ICUUC_STATIC_LIBS libicuuc.a) SET(_ICUUC_SHARED_LIBS libicuuc.dll.a icuuc) IF(USE_STATIC_LIBS) FIND_LIBRARY(ICUI18N_LIBRARY NAMES ${_ICUI18N_STATIC_LIBS} ${_ICUI18N_SHARED_LIBS}) FIND_LIBRARY(ICUUC_LIBRARY NAMES ${_ICUUC_STATIC_LIBS} ${_ICUUC_SHARED_LIBS}) ELSE() FIND_LIBRARY(ICUI18N_LIBRARY NAMES ${_ICUI18N_SHARED_LIBS} ${_ICUI18N_STATIC_LIBS}) FIND_LIBRARY(ICUUC_LIBRARY NAMES ${_ICUUC_SHARED_LIBS} ${_ICUUC_STATIC_LIBS}) ENDIF() SET(ICU_LIBRARIES ${ICUI18N_LIBRARY} ${ICUUC_LIBRARY}) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(ICU DEFAULT_MSG ICU_LIBRARIES ICU_INCLUDE_DIR) MARK_AS_ADVANCED(ICU_LIBRARIES ICU_INCLUDE_DIR) </code></pre> <p>and made my project search for the boost libs here like this:</p> <pre><code># find boost set(REQUIRED_BOOST_COMPONENTS locale system filesystem regex thread) if(WIN32) set(Boost_THREADAPI win32) set(framework_DEFINITIONS ${framework_DEFINITIONS} -DBOOST_THREAD_USE_LIB) # fix boost thread linkage set(REQUIRED_BOOST_COMPONENTS ${REQUIRED_BOOST_COMPONENTS} chrono) # mingw32 does not have std::thread else() find_package(ICU) set(Boost_LIBRARIES ${Boost_LIBRARIES} ${ICU_LIBRARIES}) endif() set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_LIBS ${USE_STATIC_LIBS}) find_package(Boost 1.50.0 COMPONENTS ${REQUIRED_BOOST_COMPONENTS} REQUIRED) </code></pre> <p>and it finds it no problem</p> <pre><code>-- Found ICU: /usr/lib/libicui18n.a;/usr/lib/libicuuc.a -- Boost version: 1.50.0 -- Found the following Boost libraries: -- locale -- system -- filesystem -- regex -- thread </code></pre> <p>But I am still getting this error when I try to compile. I am running Ubuntu 12.04 getting my boost libraries from <a href="https://launchpad.net/~28msec/+archive/boost" rel="nofollow">https://launchpad.net/~28msec/+archive/boost</a> repository as 12.04 does offer a package for boost 1.50 libraries. I am using standard package for libicu-dev (4.6.x).</p> <p>EDIT: I also compiled my own 1.50.0 boost libs configured with and without ICU (both didn't work) I also compiled my own ICU libs and still same error... I'm completely stumped on this.</p> <p>Perhaps someone will be able to help me figure out what is going on. Any help is appreciated! Thanks, Ben.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload