How does C++ programming work on Linux...

How does C++ programming work on Linux? I'm quite well versed in C++ programming on Windows but it looks like I'm going to have to get used to writing it on Linux too. I've been using VS on the Windows side, what are some good tools I need on the Linux side? Should I just go balls in with terminal based tools or is there some good VS-like IDE for it? How hard is it to make cross platform builds that will seamlessly build on either system?

Picture largely unrelated

Attached: strip-poker-professional.gif (640x480, 116K)

Other urls found in this thread:

github.com/Microsoft/vscode/issues/60
github.com/Microsoft/vscode/issues/16131
twitter.com/AnonBabble

I think I played this game when I was like 13 in 1994.

>good VS-like IDE
Clion, I'd argue it's even better than vs, but that's just personal opinion
Or you could just spend a couple of days configuring emacs and have a similarly capable setup but also be leet (what I did)

>Clion
It's pretty damn expensive though, and subscription based. Any alternatives that provide similar level of quality?

Bitch on top right could get it

>what are some good tools I need on the Linux side?
Qt creator
>How hard is it to make cross platform builds that will seamlessly build on either system?
easy

Vscode and learn how to use g++

This, don't waste time on anything else

g++ -o output main.cpp -llinker

Then
./output
To run.
Anything more complex than this and you'll probably want a make file

Good for hello world. Useless for any actual program

The difficulty of writing platform-independent code really depends on which libraries you're using, how much you're relying on OS-specific system calls and how you're building your project; if you use CMake for your build scripts then it's able to generate a VS solution on Windows, the XCode equivalent on macOS or a standard Makefile on Linux all from the same script

There are a few books that document the POSIX API (the standard system API shared by all standard-compliant Unix-likes such as macOS and the BSD's) along with a lot of the extra Linux-specific system calls, Robert Love's "Linux System Programming" is one and Michael Kerrisk's "The Linux Programming Interface" is another; if you want to be cross-platform though then you should be programming against a toolkit like Qt or Boost instead of writing system calls directly

VS Code has been available on Linux for a while now, failing that you could use KDevelop, Qt Creator or Code::Blocks

Learn to write a Makefile faggot.

KDevelop looks pretty decent

Learn how to use g++ and how to write makefiles to use with it. It's a much cleaner environment than Visual Studio. I use VS too, but mainly for C#. Vscode is a good text editor. Emacs is great too. It has great buffer flexibility with is wonderful to work with multiple files. The only thing I think vscode is better than Emacs at is the easiness of installing plugins, and it has good intellisense. But the flexibility of buffers with Emacs gives me great nostalgia.

But I'm babbling now. Just learn how to makefiles and use g++. It's a much more comprehensible process than using Visual Studio's linker.

Visual studio's build configuration is the most fucking awful thing to use, and I love the rest of the IDE

Lucky you.

Attached: A9B877C7-8D09-4A33-91AB-995FF709A43F.gif (320x200, 7K)

Still fappable

it's not that bad, personally the best IDE i've ever used on Linux was KDevelop. CLion is also pretty nice but the UI sucks ass, like it's filled with minor inconsistencies that trigger my auts. CLI editors also work, people will argue all day about the whole IDE vs. CLI tools argument but honestly it's like picking a main in smash bros or picking a guitar, everybody has their own preference and what matters is that you find something you enjoy. the only one i have an irrational hatred for is VSCode but it has more to do with the pretentiousness nature of it and less the actual editor itself, like it screams zoomer but that's just my 2c

Attached: jetbrainsisgay.png (1296x860, 139K)

Qt Creator, KDevelop and Visual Studio Code.

there's several versions of the game

Attached: strip_poker_3_06.gif (320x200, 8K)

Vscode is slow trash that can easily take more than 1gb of memory. Use Vim, g++, Makefile. Stop being a lil IDEbaby and become a man.

Wow a whole gigabyte of memory

Use the terminal as an IDE. Use vim + YCM for editing and autocompletion and other IDE-like features.

If only we could have over 2 gigabytes of ram in our personal computers nowadays... Perhaps this is a feature of when cars fly, and man harvests asteroids for metals and minerals.

>1gb of memory
The horror

Attached: 006.jpg (1600x1407, 207K)

>stop using tools designed around improving your workflow

vim is a text editor and that's where it shines, it was never meant to be stuffed with so many plugins it ends up resembling an IDE

>Let's Lazy Developers get away with shitty code because hardware is cheap.
Welcome to Jow Forums

Hardware is cheap. Your argument would have worked in 1998. Now, not so much. And if you're a developer and you buy a potato PC, it's your own fault.

I'm not even defending the fact that it's based on Electron, I think that's pretty stupid. But at this point who the fuck cares. It's a productivity tool not a feet massager

>t. never learned vim beyond opening and closing it
YCM just adds syntax and file completion. You're not stuffing it with anything, and it ends up being superior to bloated garbage like VSCode. Just open up a terminal and use system utils if you want a full IDE, it's not hard.

Just because an IDE uses 1GB of memory doesn't mean it's poorly written you absolute retard. It likely keeps a lot of itself in memory to provide quick response times for on demand features, which is actually a sign of the developers understanding that it isn't 1998 anymore and that they can utilize more system resources to prove a better experience for their end users.

>He hasn't use Visual studio with a top end PC and still have lags.
>Muh productivity
Meanwhile I just use vim and get no lag and have all the productivity I need while using some lightweight utils like YCM to help me in my work.

Your thinking is the reason softwares are getting more and more slow and bloated. And the user experience is degrading.

Came here to post this. GNU make is based, microsoft cannot into functioning build systems.

Since it's C++ the compiler will be eating all ram like a greedy fucker.

Attached: b6r.jpg (157x92, 6K)

Or I could use an application which provides all of those features and utilities within an environment and interface designed specifically around enhancing my workflow instead of being an absolute retard and using a terminal and and text editor.

I've been using vim for nearly 20 years, I know a hell of a lot more about its caveats than you do. Now stop parroting the opinion of every inexperienced developer and open your fucking eyes, using a text editor and terminal to code in this day and age is archaic and inefficient as hell.

>GNU make is based
Is it really? I keep hearing about how horrible it is. I never actually wrote a make script tho

Only because people are clueless and don't know how to use it so they end up copy pasting a lot and writing 10000 line makefiles. The basic idea of it is quite simple and powerful.

>wanting to tie yourself to a given ecosystem instead of having a myriad of interchangeable tools are your disposable to use however you see fit
>if it's not a gui, it's archaic
Name one "enhancement" you get from using VSCode that a terminal doesn't provide.

>t. Button clicker darky

Attached: 1524665000663.jpg (850x478, 33K)

>Name one "enhancement" you get from using VSCode that a terminal doesn't provide.
An easy to use, streamlined interface

VSCode doesn't have that though. It does however, have telemetry and spyware.

Prove it. I'll wait

github.com/Microsoft/vscode/issues/60

Interchangable? You are literally limiting yourself to the plugins available to vim you retard, you are doing the exact same thing any time you decide to to use a specific editor or IDE to code. You're also committing yourself to an ecosystem where the developer of any plugin may just up and one day abandon it because there's no real incentive for them to persistently do so, unlike the people who develop IDEs

I don't have to spend time writing commands in a terminal to perform basic tasks. Nor do I have the time to sit here debating with some idiotic shit that has never worked on a major project before about the benefits of using an IDE . If you had ever actually used VS beyond the basic function of being a syntax highlighter and completer you'd already know about the features it offers.

github.com/Microsoft/vscode/issues/16131

Wow. Lol

> autistically obsessing about irrelevant stuff
welcome to the real world, dumbass

This means nothing, might as well just be personal preference. Anything is easy to use if you learn it, even notoriously bad stuff like CLI git.
All the plugins I use are open source. Yes, projects die, but so what, move on, find something else. This is a none argument, and has never happened to me. And I wasn't just referencing vim, or any other editor, I mean the unix ecosystem as a whole.
>to perform basic tasks
Ok, name some. You have yet to describe your workflow, yet are claiming it's inseparable from a specific GUI editor.
>the features it offers
I reiterate, name some. IDE-like features aren't limited to, well, a single-application IDE.

I thought I smelled Monster Energy.

I did not refer specifically to VSCode in my initial reply and purposely refrained from doing so in my second reply, at the end I was merely indicating that if you had ever used VSCode beyond its core functionality you would already know about what it offers, I personally don't use it. Now stop twisting my words to suit your argument.

I myself program on Linux, not Windows. The point is the same, regardless of your environment—Windows or Linux (it's not Unix)—a dedicated IDE will have a streamlined interface designed around providing you optimal workflow for (usually) a specific language. From macros and tools that mitigate the need to write terminal commands (itself a time consuming process) to using visual solutions to design and develop programs to built-in collaboration tools that make it easy to manage and work on projects that live outside the open-source community, an IDE is simply going to provide you with better workflow in a professional environment, something you have clearly never encountered.

Qt Creator is alright, especially if you're using the Qt framework.

Is there any particular reason to choose one or the other when it comes to Qt creator vs KDevelop? I never really got why we have both of them in existence when the KDE project and Qt are practically joined at the hip

I use vim with the YouCompleteMe and rtags plugins for code completion and diagnostics, plus ctags (exuberant-ctags really) for textual indexing. For building, use cmake. For debugging I just use GDB on the console. Learn to write startup scripts for it, it's the only way to keep sane. It's not as comfy as Visual Studio, but it works and is functional. Make sure to never ever hit a breakpoint or otherwise interrupt a GUI program while it has a menu open or you'll lock up your graphics and need to log in via SSH to kill it.

I honestly don't know. I'm kind of stuck with Qt Creator because of my job and I'm happy enough with it so I haven't really looked into KDevelop.

QtCreator costs money unless you license your code as GPL (or some other OSS license, I forget which apply). To develop proprietary software, it costs a lot of money. VisualStudio-level money. KDevelop is also older than QtCreator IIRC.

To add to what everyone else has said, there are also the CDT plugin for Eclipse, which was functional the last time I tried it, but ate memory and lagged a lot, but that was about 12 years ago, so it's probably ok today. I mean people use javascript-based shit with no issue.
Also NetBeans supports C++ development, but I've never tried it.
There is also some Gnome shit, but it's shit.

Pretty sure the IDE is free and you can use it without actually using Qt. Still, I don't like the IDE at all. Seems very weird to me.

My company e-mailed the Qt team directly asking if us developing proprietary software with QtCreator (if we don't use Qt libs) would require us to buy a license and they said yes. They could have just wanted to sell more licenses, but we decided not to risk it, so we're not using QtCreator.

One more reason to avoid Qt and its maze of legal bullshit I guess

>The difficulty of writing platform-independent code really depends on which libraries you're using, how much you're relying on OS-specific system calls and how you're building your project;
If your goal is a platform independent GUI application then use Xojo. It's commercial, but it dramatically simplifies the entire process, and builds native binaries which use native UI elements. It blows Java out of the water and is just easier to learn/use than Qt.

It also has a nice IDE.

Oh yeah: Xojo doesn't have any of the legal bullshit of Qt, and is far cheaper to develop proprietary software.

Not exactly cheap but at least it's not subscription based I guess

I'm curious now, how could they prove that you were using Qt Creator for your project as long as you don't have project files in your source control?

>Qt creator
This. You don't have to use it for qt, it also functions as a good generic cepples ide

any text editor u want + language server (clangd/cquery/ccls). learning CMake is a bonus, works on all 3 platforms

Savage

Check the manpages of Linux functions!!!!!

Why do the cards have 2 extra symbols?