Strange '_JustMyCode_Default' error with VS2019
I'm building a suite of libraries based around Gtk and Gtkmm. I'd built them all previously a long time ago (as 32-bit, using VS2005) but now I'm trying to build 64-bit versions using VS2019. I've built around 40 libraries so far (all standard 'C') and haven't encountered any problems....
But this morning I tried my first C++ library (Glibmm). A 64-bit Release build works fine but when I tried a Debug build it gave me this strange error, which I've never seen before:-
Code:
Generate Module Definition file
libglibmm64-2.4-0D.def : error LNK2001: unresolved external symbol _JustMyCode_Default
F:\GTK-SOURCES\gnu-windows\src\MB3Glibmm\build\msvc\x64\Debug\bin\libglibmm64-2.4-0D.lib : fatal error LNK1120: 1 unresolved externals
I think the error's being reported by the linker (which can't find one of the symbols in libglibmm64-2.4-0D.def). There's no function of that name in the actual code so I'm guessing it'll be a setting somewhere that needs to be changed - but I can't see anything obvious in my VC project. Any ideas anyone?
Re: Strange '_JustMyCode_Default' error with VS2019
I found it - it's under Properties->C/C++->General - for some reason I need to set it to No when building a C++ library in Debug mode (I don't really understand why :confused: )
Re: Strange '_JustMyCode_Default' error with VS2019
Thanks for the heads-up tip re Just My Code property. My default is no and I have never changed it. :thumb:
Re: Strange '_JustMyCode_Default' error with VS2019
We are using hippomock for our unit testing, and we had to set this property to "yes" on a Windows Server 2016 or our Windows API mocks weren't called. No-one figured out why.