2

I have Code Blocks 12.11 and I have Cygwin 1.7.27 installed. I have configured C::B to run the Cygwin compiler and it works, but when I try to run the debugger from the Code Blocks environment I get the error:

Cannot open file /cygdrive/c/some_path/main.c

At /cygdrive/c/some_path/main.c:15

If I try to run gdb on the same file from the cygwin command line interface, it works.

Can somebody please help me fix this problem?

2 Answers 2

3

A way to make it work is adding a string value under

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2

HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\mounts v2

with

name = cygdrive prefix

value = /cygdrive

If the folders do not exist you have to create them manually.

Sign up to request clarification or add additional context in comments.

Comments

0

I have the same problem and this fix does not work if Cygwin is installed separately and then Code::Blocks is installed later.

I am using Code::Blocks version 13.12 and GDB version 7.6.5.

1 Comment

Well, I cannot help you there. I had a different version of code blocks and it was installed before cygwin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.