Debug version of ROOT 6-22-06 under Windows 10

ROOT Version: 6-22-06
_Platform:_Windows [Version 10.0.19041.630]
_Compiler:_MS VS 2019\Community…\14.23.28105

Dear ROOTers, I met problems with transfer of working root based programs with GUI from root_5.34.38 to root_6.22.06 (and 02). Platform Windows 10 64-bit. Target x86. No problems with Release configuration of the application, but Debug mode does not work:

I created small example to reproduce the problem:

CMakeLists.txt (717 Bytes) ex3LinkDef.h (95 Bytes) myFrame.cpp (4.4 KB) myFrame.h (3.0 KB) RootProject.cpp (763 Bytes)

I also tried to build debug version of root from sources, but the build stopped with "CUSTOMBUILD : error : Parsing Linkdef’ in “onepcm.vcxproj”.

How to solve this?

Cheers, Elena

Hi Elena,

The error you see (in the command prompt) is most probably due to a pointer formatting issue. I’ll try your small example as soon as possible and let you know. BTW, when building in debug mode, make sure you don’t use the MSVC debug runtime libraries (i.e. use the /MD flag and not /MDd)

Cheers, Bertrand

Hello, Bertrand,
and thanks a lot for your hint about /MDd flag: /MD flag was the reason why I tried to build own debug version.

Please, take in mind that on my machine the diagnostics in the “small example” debug version (“abort() has been called”) differs from one for the main application.

Good luck, Elena

Yes, I’ve seen that, I can reproduce the issue. Will look into it

So there are two solutions: Add target_compile_options(${PROJECT_NAME} PRIVATE /MD) in your CMakeLists.txt or build your project in RelWithDebInfo mode

You are right, this approach solved the problem for “small example”. With main application I, probably, have the problem before - with the large class header (may be https://github.com/root-project/root/issues/6824 ?). Also, I will try to look into formatting of all pointer arguments, as you suggested. Thanks a lot for your help.

You’re welcome, and feel free to ask if you have more issues with your project

Dear Bertrand, thanks once more. I finally solved the problem with main application, which uses several third-party libraries. :slightly_smiling_face:
The key point is to properly exclude linking debug and release versions of Microsoft run time DLLs in one application.

Good luck, Elena

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.