1

When I went to try to use the debugger in Clion, I got the following Error:

Error running 'array_practice': Debugger executable is incorrect

I have a debugger configured. It looks like it should work:

enter image description here

I downloaded gdb-10.2.tar.gz & gdb-10.2.tar.xz files (as seggested in the jetbrains manual) But I have no real clue as for what should I do with these files.

enter image description here

[![I installed MSYS2 by the instructions, TBH I didn't understand this part: and from then on the GSL library will be automatically found by your compiler!

Make sure any compilers and libraries you install have this package prefix (mingw-w64-x86_64- for 64-bit or mingw-w64-i686- for 32-bit). Only use unprefixed packages for misc command-line utilities (such as grep, sed, make, etc), unless you know what you're doing. ]4]4 Anyway, Clion does not detect the c compiler :
enviorment and compiler not found

Yaniv Val
  • 11
  • 3
  • Target operating system may help us understand and explain what went wrong. – user4581301 Nov 29 '21 at 19:56
  • Oh, not as important as I thought. I looked at the image. Clearly Windows. Usually gzipped tar files are used on Unix-derived systems. Can I point you [at a more up-to-date tool chain](https://stackoverflow.com/a/30071634/4581301) that comes with a much more complete ecosystem than your current MinGwW install? – user4581301 Nov 29 '21 at 19:59
  • 2
    I don't have access to a Windows system right now, but have you checked if CLion on Windows comes with a bundled GDB (or LLDB)? Can you select one of them in the "Debugger" drop-down? – Some programmer dude Nov 29 '21 at 20:14
  • `gdb-10.2.tar.gz` is a comporessed archive of the source code of GDB. You need to compile it, after making a source tree out of it – Basile Starynkevitch Nov 29 '21 at 20:37
  • @user4581301 Do you mean I should install MSYS2? I'm not sure about if because my school test our codes on their platform and they said it must be gcc. According to this, will MSYS2 do the work? – Yaniv Val Nov 29 '21 at 20:38
  • @Someprogrammerdude see the new attached photo, the drop down menu is empty – Yaniv Val Nov 29 '21 at 20:47
  • @BasileStarynkevitch could you please elaborate about how to compile and making the source tree please? I didn't really understand. – Yaniv Val Nov 29 '21 at 20:48
  • The instructions I linked will install the MSYS2 tool set and a MinGW GCC toolchain complete with debugger. All should be close to cutting edge. I don't follow gdb well enough to know what version that would be, but I'm, a little out of date and have 10.1. – user4581301 Nov 29 '21 at 20:51
  • Thing is, I'd expect what you have to work. The GDB API doesn't change all that much. – user4581301 Nov 29 '21 at 20:53
  • https://stackoverflow.com/q/5665800/841108 ; I recommend to install Linux (e.g. [Debian](https://debian.org/)....) on your laptop, if that is allowed – Basile Starynkevitch Nov 29 '21 at 21:08

0 Answers0