Help needed in Doctor Chef (WA in sample testcases)

No, sorry - I don’t use Windows.

1 Like

after setting up local compiling trough my windows cmd terminal and g++ compiler my compiling failed when i used this flag -fsanitize=undefined

when i used this command :
C:\Users\Humble Fool\Desktop\dummy>g++ main.cpp -g -D_GLIBCXX_DEBUG -ftrapv
the .cpp file compiled properly !

but when i used this command :
C:\Users\Humble Fool\Desktop\dummy>g++ main.cpp -g -D_GLIBCXX_DEBUG -fsanitize=undefined -ftrapv

I got this error -

C:/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lubsan        
collect2.exe: error: ld returned 1 exit status

few people on stackoverflow were saying that maybe my compiler doesn’t supports it ! but if that’s the case then how is it working on your machine ?

It’s not working because the linker can’t find libubsan.so. Maybe you should shift to MSVC because it has support for AddressSanitizer. Hope this helps. :slight_smile:

in case Windows annoys you too much, Linux welcomes you :stuck_out_tongue_winking_eye:

1 Like

what is MSVC ??

@ssjgz can you give me some links to resources where i can learn how to setup my machine for being able to debug c++ code just like you did ??