Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. HDF5 library and H5T

HDF5 library and H5T

Scheduled Pinned Locked Moved Solved 3rd Party Software
11 Posts 4 Posters 2.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Neptunus

    Hi,
    I'm a doing a project where hdf5 library is used under windows.
    I have a problem using H5T command to crete and use h5t table.
    I have these errors:
    main.obj:-1: error: LNK2019: riferimento al simbolo esterno __imp_H5TBmake_table non risolto nella funzione main
    main.obj:-1: error: LNK2019: riferimento al simbolo esterno __imp_H5TBread_table non risolto nella funzione main
    main.obj:-1: error: LNK2019: riferimento al simbolo esterno __imp_H5TBget_table_info non risolto nella funzione main
    main.obj:-1: error: LNK2019: riferimento al simbolo esterno __imp_H5TBinsert_record non risolto nella funzione main

    I had included the libraries hdf5, hdf5_cpp, hdf5_tools, libhdf5_hl, libz, libszaec and the directory "include".
    In the environment variable I added the bin directory.

    I added #to use H5 in windows
    DEFINES += H5_BUILT_AS_DYNAMIC_LIB

    in the pro file.

    How can I resolve this error?
    Thanks.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @Neptunus said in HDF5 library and H5T:

    I added #to use H5 in windows
    DEFINES += H5_BUILT_AS_DYNAMIC_LIB

    Do you also link against that library in your project? Please show your pro file.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • N Offline
      N Offline
      Neptunus
      wrote on last edited by
      #3

      QT -= gui

      CONFIG += c++17 console
      CONFIG -= app_bundle

      You can make your code fail to compile if it uses deprecated APIs.

      In order to do so, uncomment the following line.

      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

      SOURCES +=
      main.cpp

      #to use H5 in windows
      DEFINES += H5_BUILT_AS_DYNAMIC_LIB

      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target

      win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -lhdf5
      win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -lhdf5_cpp
      win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -llibszaec
      win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -llibz
      win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -lhdf5_tools
      win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -llibhdf5_hl
      INCLUDEPATH += $$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/include'
      DEPENDPATH += $$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/include'

      jsulmJ 1 Reply Last reply
      0
      • N Neptunus

        QT -= gui

        CONFIG += c++17 console
        CONFIG -= app_bundle

        You can make your code fail to compile if it uses deprecated APIs.

        In order to do so, uncomment the following line.

        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

        SOURCES +=
        main.cpp

        #to use H5 in windows
        DEFINES += H5_BUILT_AS_DYNAMIC_LIB

        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target

        win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -lhdf5
        win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -lhdf5_cpp
        win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -llibszaec
        win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -llibz
        win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -lhdf5_tools
        win32: LIBS += -L$$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/lib/' -llibhdf5_hl
        INCLUDEPATH += $$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/include'
        DEPENDPATH += $$PWD/'../../../../Program Files/HDF_Group/HDF5/1.12.2/include'

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @Neptunus Can you post whole build log?
        Does Program Files/HDF_Group/HDF5/1.12.2/lib/ contaon the libs (including *.lib files)? You should avoid using paths with spaces.
        Do you use same compiler which was used to build hdf5 lib to also build your app?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        N 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Neptunus Can you post whole build log?
          Does Program Files/HDF_Group/HDF5/1.12.2/lib/ contaon the libs (including *.lib files)? You should avoid using paths with spaces.
          Do you use same compiler which was used to build hdf5 lib to also build your app?

          N Offline
          N Offline
          Neptunus
          wrote on last edited by
          #5

          Thanks for your reply.
          The lib directory contains the .lib files.
          Where Can I find the log file?
          I installed "the Pre-built Binary Distributions" for windows compilated with vs16, but I am using VS2019. Do you think that the problem is this?

          Thanks,
          S.

          jsulmJ 1 Reply Last reply
          0
          • N Neptunus

            Thanks for your reply.
            The lib directory contains the .lib files.
            Where Can I find the log file?
            I installed "the Pre-built Binary Distributions" for windows compilated with vs16, but I am using VS2019. Do you think that the problem is this?

            Thanks,
            S.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @Neptunus said in HDF5 library and H5T:

            Where Can I find the log file?

            Where do you build? In QtCreator?

            "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            N S 2 Replies Last reply
            0
            • jsulmJ jsulm

              @Neptunus said in HDF5 library and H5T:

              Where Can I find the log file?

              Where do you build? In QtCreator?

              "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

              N Offline
              N Offline
              Neptunus
              wrote on last edited by Neptunus
              #7

              @jsulm thanks.
              I read the Readme.md in the distribution.:
              It was compilated with This directory contains the binary (release) distribution that was compiled on Windows x64, using VISUAL STUDIO 2019.
              so, this is not the problem.

              SGaistS 1 Reply Last reply
              0
              • N Neptunus

                @jsulm thanks.
                I read the Readme.md in the distribution.:
                It was compilated with This directory contains the binary (release) distribution that was compiled on Windows x64, using VISUAL STUDIO 2019.
                so, this is not the problem.

                SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @Neptunus hi,

                Did you check the architecture of the library ? Are you using the same as your application ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Neptunus said in HDF5 library and H5T:

                  Where Can I find the log file?

                  Where do you build? In QtCreator?

                  "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

                  S Offline
                  S Offline
                  SimonSchroeder
                  wrote on last edited by
                  #9

                  @jsulm said in HDF5 library and H5T:

                  "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

                  Well, Microsoft likes to confuse people. There is an internal version number for the compiler and a year version number visible for the user. VS16 is VS2019, VS17 is VS2022, VS15 is VS2017. VS15 and VS16 are even compatible. So, no this is most likely not your error.

                  N 1 Reply Last reply
                  1
                  • S SimonSchroeder

                    @jsulm said in HDF5 library and H5T:

                    "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

                    Well, Microsoft likes to confuse people. There is an internal version number for the compiler and a year version number visible for the user. VS16 is VS2019, VS17 is VS2022, VS15 is VS2017. VS15 and VS16 are even compatible. So, no this is most likely not your error.

                    N Offline
                    N Offline
                    Neptunus
                    wrote on last edited by
                    #10

                    @SimonSchroeder said in HDF5 library and H5T:

                    @jsulm said in HDF5 library and H5T:

                    "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

                    Well, Microsoft likes to confuse people. There is an internal version number for the compiler and a year version number visible for the user. VS16 is VS2019, VS17 is VS2022, VS15 is VS2017. VS15 and VS16 are even compatible. So, no this is most likely not your error.

                    ah, I discovered this today :)

                    I am using qt creator with msvc2019 64 bit.

                    N 1 Reply Last reply
                    0
                    • N Neptunus

                      @SimonSchroeder said in HDF5 library and H5T:

                      @jsulm said in HDF5 library and H5T:

                      "vs16, but I am using VS2019" - I think the lib is not compatible with your compiler.

                      Well, Microsoft likes to confuse people. There is an internal version number for the compiler and a year version number visible for the user. VS16 is VS2019, VS17 is VS2022, VS15 is VS2017. VS15 and VS16 are even compatible. So, no this is most likely not your error.

                      ah, I discovered this today :)

                      I am using qt creator with msvc2019 64 bit.

                      N Offline
                      N Offline
                      Neptunus
                      wrote on last edited by
                      #11

                      I found the problems:
                      I forgot to include the libraries hdf5_hl
                      hdf5_hl_cpp and hdf5_hl

                      I had 2 versions of hdf5 installed: 12.2 and 14.0

                      I had to uninstall 12.2.
                      Now, it seems to work.

                      Thanks to all.

                      1 Reply Last reply
                      3
                      • N Neptunus has marked this topic as solved on

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved