0

I have a console app which I want to compile for Linux.

I don't have access to a Linux operating system at the moment, but I really do need to compile this program for as many operating systems as possible.

I do have a basic idea of what Linuxes are and that they have different bases, but I have no idea on how to compile for them.
And I have made this C++ application on Code::Blocks, so I would like to know how to compile for Linux.
The easiest way or better say the most efficient.

I want to compile the program for both RPM- and Debian-based Linux.

5
  • 1
    I would run Linux in a VM Commented Jul 18, 2024 at 18:56
  • 1
    Path of least resistance would be to spin up Windows Subsystem for Linux (WSL) and make your own sort-of linux box. Alternative is to track down a cross compiler and configure Code::Blocks to use the cross compiler rather than your usual Windows build tools. Commented Jul 18, 2024 at 19:00
  • Check the project-options. There is the option to select the build targets. There should an option "Platforms". You can select Windows, Linux and Mac. Check with this: codeblocks.org/docs/build_targets.png Commented Jul 18, 2024 at 19:00
  • 2
    "this is not a duplicate of others i am asking for help on codeblocks." The thing is Code::Blocks is an environment that sits atop a compiler, so the only difference you'll see between any cross compiler-based answers and what you want is configuring code::blocks to use a different set of build tools. Commented Jul 18, 2024 at 19:02
  • 1
    I'm with catnip on this although I prefer VMWare and Ubuntu. Nothing beats testing stuff on the actual target OS - you can get misleading results with Windows ports when Unix and DOS disagree on eg capitalisation of source or include file names. Commented Jul 18, 2024 at 19:47

0

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.