Disabled options

General questions regarding the usage of CodeLite
XP15EF
CodeLite Curious
Posts: 3
Joined: Sat Feb 29, 2020 11:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Disabled options

Post by XP15EF »

Hi,

I created, under Ubuntu and CodeBlocks, a small program to manage Unicode UTF8 characters in translation PO files.
It works well.

Now, I want, under Windows, create a Windows version of this program. CodeBlocks is not valid under Windows as it
even not accepts accented letters.

That's why I came to CodeLite, as a newbye.

I created a New project/Console/Simple executable (gcc).
In main.c, I copied-pasted the main.c code from Ubuntu. (this program has only the main.c file. The console is only used
to enter the name of the file to be treated).

F5/Build and Debug gives me "0 errors, 0 warnings".
Ctrl-F5/Execute gives me the console, but only displays "Press Enter to continue", my question "Enter file name:" is not
displayed and no file is treated :-(

To resolve this problem, I want to use F10 F11 commands, but they are disabled, greyed out. Why that?
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Disabled options

Post by DavidGH »

Hi,

Are you trying to run under Windows now, or is this still ubuntu but using CodeLite instead of C::B?
I want to use F10 F11 commands, but they are disabled, greyed out. Why that?
They are debugger buttons. I suspect they will be disabled once the program exits and, if that is immediately, you'll never see them enabled.

Is the debugger running? Try opening the Debugger view (probably Ctrl-Alt-D or from the View menu) and, in the Output tab, check the Enable Log box; then debug again. The output should then give you useful information about whether the debugger runs at all and, if so, what goes wrong.
If it does run, it might be worth checking Settings > Debugger Settings: 'Automatically set breakpoint at main'.

Regards,

David
XP15EF
CodeLite Curious
Posts: 3
Joined: Sat Feb 29, 2020 11:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Disabled options

Post by XP15EF »

Thank you for your answer.

I am under Windows 10, trying to adapt my program to this OS.

So, I opened the debugger with Ctrl-Alt-D and F5/Debug. I got this:

Using gdbinit file: C:\Users\xxxx\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\xxxx\Documents\Typo\Typo
Launching gdb from : ./Debug
Starting debugger : C:\Users\xxxx\Documents\Typo\Typo\Typo.project --command="C:\Users\xxxx\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./Typo"
Failed to initialize debugger: C:\Users\xxxx\Documents\Typo\Typo\Typo.project

Any idea about this failure?
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Disabled options

Post by DavidGH »

I am under Windows 10
Ah, my last Windows install was Win 98... So I'm not the best person to help you.

However: Do you have gdb installed? If so, is it installed in a path\ that\ contains\ spaces, which (I hear) tends to upset Windows?
What happens if you try to run your exe in gdb outside CodeLite, in a 'terminal'?
XP15EF
CodeLite Curious
Posts: 3
Joined: Sat Feb 29, 2020 11:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Disabled options

Post by XP15EF »

Do you have gdb installed?
I browsed C: disk and didn't find it. I have been using Linux for more than 15 years and I am not well accustomed to Windows. How to to install it?

The problem is not specific to my program. I get the same thing with the "Hello World" program : Debugger/F5/debug gives me a "Failed to locate gdb! at 'gdb' " error message.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Disabled options

Post by DavidGH »

I've not needed to try, but a quick search suggests it's easily downloadable.
Post Reply