HDF5 library and H5T
-
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 mainI 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_LIBin the pro file.
How can I resolve this error?
Thanks. -
@Neptunus said in HDF5 library and H5T:
I added #to use H5 in windows
DEFINES += H5_BUILT_AS_DYNAMIC_LIBDo you also link against that library in your project? Please show your pro file.
-
QT -= gui
CONFIG += c++17 console
CONFIG -= app_bundleYou 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_LIBqnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += targetwin32: 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' -
@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? -
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. -
@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.
-
-
@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.
-
@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.
-