libMED on windows

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

libMED on windows

Post by peterl94 »

Hi,

Have any of you successfully compiled libMED on windows? I'm running into some interesting problems, so I thought I would check to see if it worked for anyone before I spend a lot of time troubleshooting. In particular, I'm getting unresolved symbol errors, for example H5T_C_S1_g (hdf5.lib is in the link list)

Thanks,
Peter
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: libMED on windows

Post by sgrogan »

peterl94 wrote:Have any of you successfully compiled libMED on windows? I'm running into some interesting problems, so I thought I would check to see if it worked for anyone before I spend a lot of time troubleshooting. In particular, I'm getting unresolved symbol errors, for example H5T_C_S1_g (hdf5.lib is in the link list)
I had to create a cMake variable and set it to point at the static hdf5.lib
see here: viewtopic.php?f=27&t=15756&start=30#p126231
"fight the good fight"
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: libMED on windows

Post by peterl94 »

Thank you! I knew you guys must have had the same issue, but I missed that thread. Anyway, I've found the root cause of the problem. You have to define H5_BUILT_AS_DYNAMIC_LIB, otherwise the macro H5_DLLVAR is not set to the needed __declspec(dllimport).
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: libMED on windows

Post by sgrogan »

peterl94 wrote:Anyway, I've found the root cause of the problem. You have to define H5_BUILT_AS_DYNAMIC_LIB, otherwise the macro H5_DLLVAR is not set to the needed __declspec(dllimport).
Thanks for the update. If I go back and do it this way, the bundled builds will me smaller?
"fight the good fight"
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: libMED on windows

Post by peterl94 »

I suppose you would save some duplication, but if the static lib works fine, I wouldn't bother.
Post Reply