How to run a C++ app in Linux

Posted January 4, 2022 113 views


I have a numerical application written in C++, the Nonuniform Frequency-Dependent Out-of-Order Fast Fourier Transform. I would like to deploy a driver for it which hits it hard, comparing results with a “direct algorithm” that computes the result in a more straightforward way.

Bottom line. I want to set up a Debian virtual machine (well any Linux distro would most likely do), compile my code using g++, and run it. How do I do this?

Matt Fulkerson

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

What you could do is to follow these steps:

  • Install the C++ compiler:
sudo apt install g++
  • Then install the build-essential package:
sudo apt install build-essential
  • Then verify your G++ version:
g++ --version
  • Once you have the compiler in place you could upload your code to the server either using SFTP, SSH or by cloning your GitHub repository.

Then finally you could compile the code using the g++ compiler.

Hope that this helps.