r/linuxquestions 21h ago

Support Noob needs help creating linux programs

I am posting this reluctantly because reddit is a toxic mess most of the time, but two hours of research and I am no closer to an answer. If this is the wrong place to ask please aim me.

I am about 6 months into using Bazzite Linux and decided to make a program for content generation for a game (does not matter for my question but for context its a program to either randomly or psudeo-randomly produce a custom planet for the game space engineers) I want to make this tool available if/when I finish so leaving it a python script (I am well aware the unholy pain converting that to c++ will be) is not going to be a good way to share it.

The problem is that while I know and have compiled stuff to exe files for windows, before I switched, I do not know anything about doing that for linux. Can anyone aim me at the noob resources for that?

I started making it in py half to teach myself py half to see if I could, I got far enough in that I stopped to think and now I need help finding the off ramp.

Edit: Thank you all for the help! I am just going to stick to python and share that when I am done.

9 Upvotes

20 comments sorted by

View all comments

1

u/serge-mv 10h ago

Python is cross-platform, unless you use some very specific things, so you can just use that if you want.

However, if you want to write it in C++, you can do that too. However, you will need to be more careful if you want to deploy it on windows and Linux because some operations will be platform-specific and without checking you might code yourself into a corner.

As for the resources, tyou can start here https://wiki.archlinux.org/title/List_of_applications/Utilities#Development

It's a list of linux tools for development, and you can go through and find out details yourself. But briefly, for Python you usually would pick either VS Code or PyCharm. For C++ there are many IDEs and you can also pick one from JetBrains, or you can just code in Vim and then compile it. IDEs are not really required, especially if you are doing a small project. Code::Blocks is a popular IDE for C++ on Linux, or CLion from JetBrains, or also VS Code.

In Linux you generally will have 2 compilers for your C code, namely GCC or CLang. Any will do for you.