JetBrains CLion/Visual Studio Code free IDE build and debug

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 341
Joined: Sun Jun 20, 2010 6:00 pm

JetBrains CLion/Visual Studio Code free IDE build and debug

Post by mcarans »

JetBrains IDE CLion is cross platform and supports Objective-C. It looks rather nice to load the project up and view it all in an IDE.
Image

It shows all the Git submodules:
Image

I have got Oolite to build on the command line following the instructions. One library is missing from the Ubuntu instructions: libpng-dev.

It would be great to get it to build and debug in the IDE. I can only get it to build if I source the GNUStep.sh file before launching CLion otherwise I get errors while building like:
*** No rule to make target '/common.make'. Stop.

It's decades since I did any C++ but I remember that makefiles could get complicated. I could not figure out how to get the makefile to source the GNUStep.sh file or to get CLion to execute GNUStep.sh before launching one of the many make targets it autodetected like "all".
Image

Does anyone have any idea how to fix this? If not, I can make a script to launch the IDE after sourcing.

I was wondering if moving to a more modern system like CMake would make it easier to understand the build process and get it working in CLion and other IDEs.
Last edited by mcarans on Sat Jul 12, 2025 5:53 am, edited 3 times in total.
User avatar
hiran
Theorethicist
Posts: 2474
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: JetBrains IDE CLion build and debug

Post by hiran »

It is good to have a platform agnostic professional IDE.
If that work it should get a mention in the developer's corner in the wiki.

For the build tool: I guess the makefile complexity is already there. Both a Makefile and a Gnumakefile are in effect, and they may spawn more such files IIRC.
If someone can cleanup here that would be an important step.
Sunshine - Moonlight - Good Times - Oolite
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 341
Joined: Sun Jun 20, 2010 6:00 pm

Re: JetBrains IDE CLion build and debug

Post by mcarans »

hiran wrote: Thu Jul 10, 2025 4:27 pm
It is good to have a platform agnostic professional IDE.
If that work it should get a mention in the developer's corner in the wiki.

For the build tool: I guess the makefile complexity is already there. Both a Makefile and a Gnumakefile are in effect, and they may spawn more such files IIRC.
If someone can cleanup here that would be an important step.
I feel like this links with the library update work going on and in particular, the removal of custom builds of libraries like espeak. These steps would significantly reduce technical debt and increase maintainability. I just hope that there's a way to use more current build tools. This thread suggests it is possible but not straightforward: https://mail.gnu.org/archive/html/discu ... 00008.html
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 436
Joined: Sun Feb 18, 2024 12:13 pm

Re: JetBrains IDE CLion build and debug

Post by MrFlibble »

mcarans wrote: Thu Jul 10, 2025 7:12 pm
hiran wrote: Thu Jul 10, 2025 4:27 pm
It is good to have a platform agnostic professional IDE.
If that work it should get a mention in the developer's corner in the wiki.

For the build tool: I guess the makefile complexity is already there. Both a Makefile and a Gnumakefile are in effect, and they may spawn more such files IIRC.
If someone can cleanup here that would be an important step.
I feel like this links with the library update work going on and in particular, the removal of custom builds of libraries like espeak. These steps would significantly reduce technical debt and increase maintainability. I just hope that there's a way to use more current build tools. This thread suggests it is possible but not straightforward: https://mail.gnu.org/archive/html/discu ... 00008.html
I stopped and uninstalled at the user agreement (cringe!), where payment was hinted at, as I didn't have time to fully read it today. If scanned correctly, Clion could lock some features behind a paywall down the line.

I don't currently use an IDE apart from occasionally Arduino. Is there a decent FLOSS one which might serve our needs? Such a thing might be less likely to twist and turn at the whim of a company director.
User avatar
hiran
Theorethicist
Posts: 2474
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: JetBrains IDE CLion build and debug

Post by hiran »

Can't blame JetBrains from earning money for providing professional IDEs. Typically their policy is to have a free community edition that may be used noncommercially. Well, there is no money behind Oolite so there is no need to worry. But I cannot blame anyone to be careful.

There is some Objective C support in Visual Studio Code: https://marketplace.visualstudio.com/it ... bjc-syntax
Although I have no clue how usable that is in practice.
Sunshine - Moonlight - Good Times - Oolite
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 341
Joined: Sun Jun 20, 2010 6:00 pm

Re: JetBrains IDE CLion build and debug

Post by mcarans »

MrFlibble wrote: Fri Jul 11, 2025 12:11 pm
I stopped and uninstalled at the user agreement (cringe!), where payment was hinted at, as I didn't have time to fully read it today. If scanned correctly, Clion could lock some features behind a paywall down the line.

I don't currently use an IDE apart from occasionally Arduino. Is there a decent FLOSS one which might serve our needs? Such a thing might be less likely to twist and turn at the whim of a company director.
CLion is free for non commercial use according to
https://www.jetbrains.com/clion/. Since Oolite is non commercial, you can use the IDE for free to develop it. JetBrains have had this setup of free for non commercial, pay for commercial use for ages. In my experience from many years using their Python IDE (PyCharm), the things behind paywall are not critical and are nice to haves - for example the code profiler (which you an in any case you can achieve with other tools outside the IDE).

JetBrains have for several years donated full versions of their software to the humanitarian organisation where I work since everything we do is non-commercial and open source. This suggests that even if features went behind a paywall in the future (which would in any case just be for nice to have rather than critical features), Oolite developers could request a donation of full licences. Would this assuage your concerns?
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 341
Joined: Sun Jun 20, 2010 6:00 pm

Re: JetBrains IDE CLion build and debug

Post by mcarans »

hiran wrote: Fri Jul 11, 2025 3:50 pm
There is some Objective C support in Visual Studio Code: https://marketplace.visualstudio.com/it ... bjc-syntax
Although I have no clue how usable that is in practice.
This is Visual Studio Code:
Image

I found a plugin for running makefile targets:
Image

With both CLion and Visual Studio Code, you get syntax highlighting and the ability to run makefiles. I've not been able to get the debugger to work fully in either. With CLion it ran, but there are no debug symbols so it won't stop at breakpoints and you see assembly language if you pause. With the latter, I can't find an option to debug when using makefiles. With both, it seems they fully support CMake and if using that, debugging will work.
User avatar
hiran
Theorethicist
Posts: 2474
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: JetBrains IDE CLion build and debug

Post by hiran »

mcarans wrote: Sat Jul 12, 2025 4:38 am
With both CLion and Visual Studio Code, you get syntax highlighting and the ability to run makefiles. I've not been able to get the debugger to work fully in either. With CLion it ran, but there are no debug symbols so it won't stop at breakpoints and you see assembly language if you pause. With the latter, I can't find an option to debug when using makefiles. With both, it seems they fully support CMake and if using that, debugging will work.
I think this is already worth to be documented at https://wiki.alioth.net/index.php/Developer%27s_Corner
Mind the three subpages for Setting up a development environment
Sunshine - Moonlight - Good Times - Oolite
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 341
Joined: Sun Jun 20, 2010 6:00 pm

Re: JetBrains CLion/Visual Studio Code free IDE build and debug

Post by mcarans »

hiran wrote: Sat Jul 12, 2025 8:12 pm
mcarans wrote: Sat Jul 12, 2025 4:38 am
With both CLion and Visual Studio Code, you get syntax highlighting and the ability to run makefiles. I've not been able to get the debugger to work fully in either. With CLion it ran, but there are no debug symbols so it won't stop at breakpoints and you see assembly language if you pause. With the latter, I can't find an option to debug when using makefiles. With both, it seems they fully support CMake and if using that, debugging will work.
I think this is already worth to be documented at https://wiki.alioth.net/index.php/Developer%27s_Corner
Mind the three subpages for Setting up a development environment
I have asked Cholmondely for wiki access via PM but oddly my message remains stuck in the outbox. I'm not sure what I need to do to get it to send.
Post Reply