Cpp compilers

From wikinotes
Revision as of 01:09, 9 March 2019 by Will (talk | contribs) (→‎compilers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Learn as much as you like, but you won't get far without a compiler. Unlike some of the languages that I am used to, C++ sets standards which may, or may not be supported by all compilers. I imagine this will become a source of frustration for me...


compilers

clang
gcc
msvc
mingw

compiler basics

  • headers
  • dynamically linking libraries (pkg-config --cflags --libs xcb xcb-randr, ...)
  • ...

interpreters

Every now and again it is useful to test out a couple of commands interactively at a prompt to see how they work out. I have gotten very accustomed to having IPython at my side, here are some of the options for C++.

cling

cling is a c++ interpreter built on top of clang and llvm.

cower -d cling-git

editors

It can be very useful to integrate your comipler into your editor. Here are some ways that this can be done.

vim

compile

vim has a builtin :make command that executes make at the root of your file-project.

The command used by :make is configured using the makeprg variable.

set makeprg=makedepend

syntax

https://github.com/octol/vim-cpp-enhanced-highlight