-
November 26th, 2020, 07:32 AM
#1
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?
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
November 26th, 2020, 08:32 AM
#2
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 )
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
November 26th, 2020, 08:45 AM
#3
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.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
November 27th, 2020, 12:40 PM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|