Results 1 to 5 of 5

Thread: Mat file API using C++ and Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Mat file API using C++ and Qt

    Hi,
    I have problem running "Read MAT-File in C/C++" from Matlab examples.
    https://www.mathworks.com/help/matla...file-in-c.html

    When I compile it from matlab command window using mex, everythink is ok, mat file is created.
    When I use the same msvc compiler parameters in command line, everything works fine.
    When I create simple console application in VS2015 and setup the project to use mat-file api (includes, libs), everything works.

    However, when I try to setup my QT application project to use mat-file api, it builds, but running the app gives me this error:Capture.PNG

    Is there some problem with conversion from Unicode? I read some article that Qt is abandoning ICU converters.
    https://wiki.qt.io/Qt-5-ICU

    Can anyone please help?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,327
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Mat file API using C++ and Qt

    The icu DLLs are in my Qt 5.5 distribution, they are not in the Qt 5.6 distribution, so apparently your reading is correct. This is true for both MSVC2013 and MSVC2015 Qt distributions.

    - Are you building everything in 64-bit mode (the error message refers to a library in a "win64" directory)?

    - Are you building and linking everything in either Release or Debug modes? You cannot mix-and-match in Windows.

    - Were the Matlab DLLs built using VS2015? Try switching your own build to use the VS 2013 platform toolset. (Properties->Configuration->General in VS2015)

    - Install Qt 5.5 and try the build from that. You can have multiple Qt distributions installed. Tell VS which one to use from the Qt5 plugin options and project settings. You'll also need to adjust your PATH to load the right DLLs at runtime.

  3. #3
    Join Date
    Apr 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Mat file API using C++ and Qt

    wow, that missing ICU DLLs might be the problem...
    I'm building everything in 64bit mode (there's no 32bit Matlab 2016a), paying attention for Debug/Release mode. However, I have no idea how Matlab DLLs were build. Matlab's DLLs are in my system path (work's great with my console application as I mentioned in my post).
    I'm installing qt5.5 now and msvc2013 qt libs.
    I have no option right now to select VS2013 platform toolset in my VS2015. Do I need to install VS2013 for that?

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,327
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Mat file API using C++ and Qt

    I have no option right now to select VS2013 platform toolset in my VS2015. Do I need to install VS2013 for that?
    I didn't think so, but I can't tell you for certain since I have both of them installed. I thought it was something built into VS2015 to allow you to target different toolsets, like Android, for example. Maybe that is something to ask Google.

  5. #5
    Join Date
    Apr 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Mat file API using C++ and Qt

    I installed VS 2013, too and now I have that option in VS2015...

    So, I tried qt5.6 with vs2013, qt5.5 with vs2013, but the error is still there
    I could try mingw (there are matlab libs for both msvc and mingw)
    Today I'm also gonna install and try that with older version of Matlab.

    If nothing of that will work, I'll use .csv files instead of .mat

    Thank you for your help!

Similar Threads

  1. Replies: 2
    Last Post: 13th January 2014, 07:27
  2. Replies: 4
    Last Post: 2nd October 2013, 13:57
  3. Replies: 1
    Last Post: 7th May 2013, 00:34
  4. Replies: 3
    Last Post: 28th March 2009, 15:37
  5. Replies: 3
    Last Post: 25th May 2007, 07:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.