using Cygwin with CodeLite
Posted: Mon Jan 14, 2013 6:39 am
Hi, is there a way of using CodeLite with Cygwin instead of MinGW on Windows? I need to use a library that builds easily under Cygwin, but has problems with mmap functions under MinGW, and seems like it'd be a pain to get it to work. Some of the options under "Settings/Debugger settings", mention Cygwin, so I thought that it might work (despite Google not returning anything definitive), but I can't get debugging to work.
I also wonder if there are any disadvantages to using Cygwin, other than installing Cygwin.
Here's some details on what I've tried, and the problems I've had:
I was able to build by adjusting under menu 'Settings/Build settings'. Under 'Build systems', I put the Cygwin make.exe instead of the MinGW version. Under the 'Compilers' tab, I un-checked 'Use compiler MT' and 'Pass object list .. via file', since there were DOS-format file names that confused Cygwin's make.
However, I couldn't figure out how to get debugging to work. Under menu Settings/Debugger Settings, I set the 'Debugger path' to Cygwin's gdb, and I tried setting 'Cygwin path conversion command' to c:/cygwin/bin/cygpath.exe -w $(File). I used Create new project to create the default project with the "Simple executable (gcc)" template, stuck a breakpoint on the line 'printf("Hello workld\n");', and ran under the debugger (F5 key) . The program starts running, but the breakpoint is never entered, and the program hangs. If I select 'Debug/Pause debugger', it says "Can't interrupt debuggee process: I don't know it's PID!". However, if I select 'Debug/Stop debugger', it kills the program and exits debug mode, as expected.
Also, if I select 'Build/Run', the program runs as expected. And if I use CodeLite's default settings (i.e., using MinGW), it runs under the debugger as expected. So the problem seems to just be with integrating Cygwin's gdb.
I'm using CodeLite 4.1.5770 on Windows 7.
Thanks!
-Z.
P.S.: in my tests so far, CodeLite seems to implement pretty much every feature from Visual Studio that I use. Thanks to the developers!
I also wonder if there are any disadvantages to using Cygwin, other than installing Cygwin.
Here's some details on what I've tried, and the problems I've had:
I was able to build by adjusting under menu 'Settings/Build settings'. Under 'Build systems', I put the Cygwin make.exe instead of the MinGW version. Under the 'Compilers' tab, I un-checked 'Use compiler MT' and 'Pass object list .. via file', since there were DOS-format file names that confused Cygwin's make.
However, I couldn't figure out how to get debugging to work. Under menu Settings/Debugger Settings, I set the 'Debugger path' to Cygwin's gdb, and I tried setting 'Cygwin path conversion command' to c:/cygwin/bin/cygpath.exe -w $(File). I used Create new project to create the default project with the "Simple executable (gcc)" template, stuck a breakpoint on the line 'printf("Hello workld\n");', and ran under the debugger (F5 key) . The program starts running, but the breakpoint is never entered, and the program hangs. If I select 'Debug/Pause debugger', it says "Can't interrupt debuggee process: I don't know it's PID!". However, if I select 'Debug/Stop debugger', it kills the program and exits debug mode, as expected.
Also, if I select 'Build/Run', the program runs as expected. And if I use CodeLite's default settings (i.e., using MinGW), it runs under the debugger as expected. So the problem seems to just be with integrating Cygwin's gdb.
I'm using CodeLite 4.1.5770 on Windows 7.
Thanks!
-Z.
P.S.: in my tests so far, CodeLite seems to implement pretty much every feature from Visual Studio that I use. Thanks to the developers!