Many years ago I built glibmm and giomm (32-bit versions) using Visual Studio 2005. I’m now trying to update to 64-bit builds (still with glibmm-2-44) using VS2019. All the various supporting libs have built okay.
Visual Studio offers a mode called “Link time code generation” which can optimize a Release build (so traditionally, I’ve turned it on for my Release builds - and previously it never caused any problems…) However, I’ve noticed that if I turn it on for my 64-bit VS2019 builds, glibmm and giomm end up with no exported symbols (basically, gendef32.exe produces empty “.def” files). So consequently, giomm can’t find anything when it tries to link to glibmm. 2 questions:-
- Is this a known problem?
- I’m still using my older version of gendef32.exe. I can’t remember where I got it from but should I be trying a newer version? Or is there maybe a gendef64.exe that I need to use for 64-bit builds?
[Edit…] Since first posting I’ve realised that this happens if I have ANY of the optimizations enabled. When building 64-bit versions of glibmm or giomm I need to have optimizations disabled in order to get a valid .def file (that probably explains why a Debug version builds okay - but it doesn’t seem right somehow…)