C/C++ development


#1

Hello,
I am quite new to atom, i have been using platformio but i didn t like it so much so in a few days i stopped using it.
Now i would like to make atom my default c/c++ default development text editor
I am on ubuntu 16.04 and i am an hobbyist
I already have working code with the package gpp-compiler, but i have a few questions:
1)how could i connect my code to a built in terminal to do output/input?
2)In many ide like spydee it checks continuosly my code to see if there is any error, in atom i know it only when i run the code, is here any package that enable this function?
3)How could i run code without saving it o autosave it before running?
4)When there is a compiling error it appear only for a few seconds, could it show it forever?


#2

There are a variety of terminal packages. I use termination, but you should also check out script-runner.

Historically, this function has been served by linter and its own ecosystem of plugins. The atom-ide set of packages is a different solution to the same problem, implementing the Language Server Protocol for a smarter and more standardized experience. I haven’t had the time to look at these new packages, so I can’t be of much help there.

3)How could i run code without saving it o autosave it before running?

The packages script, atom-runner, and script-runner all support running unsaved files.

4)When there is a compiling error it appear only for a few seconds, could it show it forever?

Certainly, but that’s up to the package displaying the error.


#3

thanks for your reply
linter and linter-gcc are really great and them solved also the problem #4
about the terminal i am still unable to run my code inside atom, it opens a new terminal, it looks like that termination and script runner don’t work with c/c++
i would like something like this:

where i have the text editor and the console/terminal to run the code inside atom :heart_eyes:
(also the variable explorer would be awesome but not necessary)


#4

When you’re in a terminal window, you can use gcc and gpp commands to compile your code.


#5

At the end to run my code i am using script, the only problem is that it doesn t allow inputs from the user.

So as a reference for future users who would like to start c/cpp development with atom i suggest as bare minimum:
Gpp-compiler
Linter and linter-gcc
Termination
Script

If i will discover other useful packages i will add them, anyone could suggest something


#6

Hi have the same problem, how can I build and run in an integrated terminal like termination ? it only run it from an external terminal


#7

What error do you get from the integrated terminal?


#8

Yep same here, it is not very nice but at the end i get used to it…
If you found any nice package that allow you to do it or other userful packages for c/cpp tell me!