problems with Matlab matcreat example on a linux system



  • Hi everyone,

    im new to this forum, hopefully the topic is at the right place:)
    so my problem is the following:
    im trying to get the matcreat example (delivered by matlab) to running in the QtCreator.
    the platform im using is a Ubuntu 14.04 with Qt5.8 (gcc compiler) and Matlab 2016b installed.
    as far as im concerned my .pro file should be fine. However i get building issues regardin icu libraries here is my .pro file and the error output:

    Issues:

    matlab/2016b/bin/glnxa64/libmwi18n.so:-1: error: undefined reference to `icu_56::UnicodeString::UnicodeString(char16_t const*, int)'
    matlab/2016b/bin/glnxa64/libmwfl.so:-1: error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
    matlab/2016b/bin/glnxa64/libmwi18n.so:-1: error: undefined reference to `UCNV_FROM_U_CALLBACK_ESCAPE_WITH_INVISIBLE_CHARS_56'
    matlab/2016b/bin/glnxa64/libmwi18n.so:-1: error: undefined reference to `UCNV_FROM_U_CALLBACK_STOP_WITH_INVISIBLE_CHARS_56'
    matlab/2016b/bin/glnxa64/libmat.so:-1: error: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
    matlab/2016b/bin/glnxa64/libmwi18n.so:-1: error: undefined reference to `icu_56::UnicodeString::UnicodeString(char16_t const*)'
    matlab/2016b/bin/glnxa64/libmwi18n.so:-1: error: undefined reference to `icu_56::UnicodeString::doCompare(int, int, char16_t const*, int, int) const'
    :-1: error: collect2: error: ld returned 1 exit status
    

    pro file:

    QT += core
    QT -= gui
    
    CONFIG += c++11
    
    TARGET = matlab
    CONFIG += console
    CONFIG -= app_bundle
    
    TEMPLATE = app
    
    INCLUDEPATH += /appl/matlab/2016b/extern/include \
    
    #INCLUDEPATH += /appl/matlab/2016b/bin/include \
    
    
    LIBS += -L/appl/matlab/2016b/bin/glnxa64 \
         -lmat\
         -lmx\
         -licudata\
         -licudata\
         -licui18n\
         -licui18n\
         -licuio\
         -licuio\
         -licuuc\
         -licuuc\
    
    
    #     -lmwf\
    #     -lmwi18n\
    #     -lut\
    #     -lboost\
    #     -lboost_system\
    #     -lboost_filesystem\
    
    SOURCES += main.cpp
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which as been marked deprecated (the exact warnings
    # depend on your compiler). Please consult the documentation of the
    # deprecated API in order to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if you use deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    #HEADERS += \
    #    ../../../appl/matlab/2016b/extern/include/mat.h
    


  • can you post the contents of /appl/matlab/2016b/bin/glnxa64 ? also, make sure you are using the same compiler and architecture



  • both should be compiled with the gcc compiler... the directory contains the shared libraries e.g.: libmat.so


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.