Results 1 to 7 of 7

Thread: Using HDF5 libraries on QT

  1. #1
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Using HDF5 libraries on QT

    Hi,

    I need to use the format HDF5 for some data we collected (.h5 files). I was trying to install the libraries, but I am having a lot of problems with it. I was searching for it, but I couldn't find any useful information.

    I will appreciate your help!

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using HDF5 libraries on QT

    Provide more info on those errors you get.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using HDF5 libraries on QT

    For the first step, I installed the libraries directly from the ubuntu repositories:

    libhdf5-serial-1.6.6-0 (not this version, the new one)
    libhdf5-serial-dev
    libhdf5-doc
    hdf5-tools

    Then, I try with a simple code on QT, this is:

    #include <iostream>
    using namespace std;

    #include <H5Cpp.h>
    using namespace H5;

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    MainWindow w;

    H5File fout("data.h5",H5F_ACC_TRUNC);

    w.show();

    return a.exec();
    }

    And I get the following compilation errors:
    qt_errors.jpg

    I think it is a problem of linking the libraries, but I was searching online and I couldn't find a solution yet...

    Thanks for your help!

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using HDF5 libraries on QT

    How does your .pro file look like?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Using HDF5 libraries on QT


  6. #6
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using HDF5 libraries on QT

    I switched the line in the .pro file

    LIBS += /usr/lib/libhdf5_cpp.so

    for the suggested

    LIBS += /usr/lib/libhdf5_cpp.so -lhdf5

    And at least with the first examples, it is working!

    Thank you very much for you reply and help!! (I will keep on working on this, so if I finally can make it, I will write a small guide for setting up this library)

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Using HDF5 libraries on QT

    You should not need the /usr/lib/libhdf5_cpp.so part of that line.

Similar Threads

  1. Replies: 4
    Last Post: 5th November 2011, 01:38
  2. HDF5 I/O and Model/View
    By PhysBrain in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2008, 22:53
  3. Using .so libraries under Mac
    By maverick_pol in forum Qt Programming
    Replies: 6
    Last Post: 6th January 2008, 22:41
  4. Qt Libraries
    By Seth in forum Newbie
    Replies: 1
    Last Post: 17th April 2007, 04:53
  5. how to add new libraries to QT
    By whoops.slo in forum Newbie
    Replies: 3
    Last Post: 12th January 2007, 11:15

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.