Linker error VS2019


#1

Hi,
I am trying to build a very basic project in VisualStudio2019. Just a H5FCreate, H5Fclose. The reason is to test a build from source of HDF5 libraries.

The build of HDF5 libraries went ok, then I moved include and lib directories to my project folder, where a basic cpp code was supposed to be linked and compiled with there libraries.

unresolved external symbol _H5open referenced in function _main

and same for hf5create, hf5close and h5check_version.

I already added the linking libraries path in VC++ directories, those libraries in Linker/Input:
libhdf5.lib
libhdf5_cpp.lib
lilbhdf5_hl.lib
libhdf5_hl_cpp.lib

I am a noob in Windows, and VS as well. Probably is something so basic I could not see it, but after days googling, I decided to write here.

Thank you.


#2

Posting an help request causes immediate solution.:wink:
Wandering through the VS2019 menus, I saw a “platform” option, in Configuration Manager, set to Win32.
I set it to x64, and voilà: it compiles and works.

Sorry, hope this will help someone other.