From: Ricardo on
I'm trying to link a C program with Matlab engine in Linux ubuntu 10.04 and using eclipse CDT (with gcc compiler).
I'm getting the following errors/warnings. When I try to add the missing libraries to the list of libraries in eclipse (e.g. hdf5_hl, etc) the linker says it can't find the library, although the file is there and the library path is set correctly.


/usr/bin/ld: warning: libhdf5_hl.so.6, needed by /opt/matlab/bin/glnx86/libmat.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libhdf5.so.6, needed by /opt/matlab/bin/glnx86/libmat.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicudata.so.40, needed by /opt/matlab/bin/glnx86/libmx.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicuuc.so.40, needed by /opt/matlab/bin/glnx86/libmx.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicui18n.so.40, needed by /opt/matlab/bin/glnx86/libmx.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicuio.so.40, needed by /opt/matlab/bin/glnx86/libmx.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_thread-gcc42-mt-1_36.so.1.36.0, needed by /opt/matlab/bin/glnx86/libmwfl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_signals-gcc42-mt-1_36.so.1.36.0, needed by /opt/matlab/bin/glnx86/libmwfl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_system-gcc42-mt-1_36.so.1.36.0, needed by /opt/matlab/bin/glnx86/libmwfl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_filesystem-gcc42-mt-1_36.so.1.36.0, needed by /opt/matlab/bin/glnx86/libmwfl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libtbb.so.2, needed by /opt/matlab/bin/glnx86/libmwfl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libtbbmalloc.so.2, needed by /opt/matlab/bin/glnx86/libmwfl.so, not found (try using -rpath or -rpath-link)
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::signal_base::signal_base(boost::function2<bool, boost::signals::detail::stored_group, boost::signals::detail::stored_group> const&, boost::any const&)'
/opt/matlab/bin/glnx86/libmx.so: undefined reference to `ucnv_fromUChars_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::thread::start_thread()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pcreate'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pset_layout'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_size'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_islower_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Fopen'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_INT_g'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `typeinfo for boost::lock_error'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_open_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5check_version'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strlen_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::signal_base_impl::connect_slot(boost::any const&, boost::signals::detail::stored_group const&, boost::shared_ptr<boost::signals::detail::slot_base::data_t>, boost::signals::connect_position)'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Awrite'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_init_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::slot_base::create_connection()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_member_type'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aclose'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gunlink'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Acreate2'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_INT64_g'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::detail::get_once_per_thread_epoch()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strCaseCompare_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::thread_resource_error::thread_resource_error()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_releaseDefaultConverter_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strstr_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strncpy_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dget_space'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::connection::~connection()'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::lock_error::~lock_error()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gcreate2'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sselect_elements'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Rdereference'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_member_name'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isWhitespace_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strcat_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sget_simple_extent_npoints'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Eget_auto2'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `utf8_nextCharSafeBody_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5P_CLS_DATASET_CREATE_g'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isprint_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strFindFirst_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_vsnprintf_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gget_objinfo'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::call_notification::call_notification(boost::shared_ptr<boost::signals::detail::signal_base_impl> const&)'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isdigit_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_getDataDirectory_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_tolower_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tlock'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tinsert'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_member_offset'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `typeinfo for boost::thread_resource_error'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_SHORT_g'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::named_slot_map::end()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dread'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_toUnicode_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dfill'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gget_objname_by_idx'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_close_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strCompare_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_UCHAR_g'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `typeinfo for boost::detail::thread_data_base'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::detail::get_current_thread_data()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `utf8_back1SafeBody_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tequal'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pset_deflate'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strcasecmp_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aget_space'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `icu_4_0::Locale::Locale(char const*, char const*, char const*, char const*)'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sget_simple_extent_ndims'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::trackable::~trackable()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_digit_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_UINT64_g'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_cleanup_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::detail::once_epoch_cv'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_getDefaultName_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tset_size'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pset_userblock'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::lock_error::lock_error()'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::detail::thread_data_base::~thread_data_base()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pset_type_conv_cb'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aget_type'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strchr32_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Fcreate'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strFindLast_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strcmp_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::thread::detach()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Rcreate'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pclose'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Screate_simple'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isupper_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isalnum_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sselect_hyperslab'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_DOUBLE_g'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_memchr_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sget_simple_extent_dims'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dvlen_reclaim'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isalpha_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_C_S1_g'
/opt/matlab/bin/glnx86/libmx.so: undefined reference to `ucnv_reset_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::detail::once_global_epoch'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tvlen_create'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::connection::connection(boost::signals::connection const&)'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::thread::~thread()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dopen2'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5P_CLS_FILE_CREATE_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tcopy'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dget_type'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_sign'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_setDefaultName_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5P_CLS_DATASET_XFER_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Screate'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_UINT_g'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::signal_base::~signal_base()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_getStandardName_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_getMinCharSize_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `icu_4_0::UMemory::operator new(unsigned int)'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_FLOAT_g'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `utf8_appendCharSafeBody_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Eset_auto2'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_getMaxCharSize_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_LONG_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aopen_name'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aread'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_toupper_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_charType_4_0'
/opt/matlab/bin/glnx86/libmx.so: undefined reference to `ucnv_getNextUChar_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::thread::join()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_nmembers'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_unescapeAt_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_setDataDirectory_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_countChar32_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::system::get_system_category()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strncat_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aget_num_attrs'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sclose'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `utf8_countTrailBytes_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `ucnv_getName_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strcpy_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sget_simple_extent_type'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5open'
/opt/matlab/bin/glnx86/libmx.so: undefined reference to `ucnv_fromUnicode_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pset_chunk'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_getDefaultConverter_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_isUWhiteSpace_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_STD_REF_OBJ_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tclose'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::connection::disconnect() const'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aopen_idx'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::system::get_generic_category()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_SCHAR_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gopen2'
/opt/matlab/bin/glnx86/libmx.so: undefined reference to `ucnv_toUChars_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `vtable for boost::detail::thread_data_base'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strncmp_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_USHORT_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Sset_extent_simple'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_vsscanf_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::named_slot_map::begin()'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strcmpCodePointOrder_4_0'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::detail::once_epoch_mutex'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_memrchr_4_0'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_strncasecmp_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dwrite'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Rget_obj_type2'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dclose'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Pget_type_conv_cb'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tget_class'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Tcreate'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5T_NATIVE_ULONG_g'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Fclose'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Lmove'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gget_num_objs'
/opt/matlab/bin/glnx86/libmwfl.so: undefined reference to `boost::signals::detail::call_notification::~call_notification()'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Gclose'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Dcreate2'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `icu_4_0::UMemory::operator delete(void*)'
/opt/matlab/bin/glnx86/libut.so: undefined reference to `u_iscntrl_4_0'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Aget_name'
/opt/matlab/bin/glnx86/libmat.so: undefined reference to `H5Scopy'
collect2: ld returned 1 exit status