PrevUpHome

Haiku: gcc [c++ compiler]


Install gcc c++ compiler on Haiku OS, gcc the gnu c++ compiler.

Up: c++ compilers

Haiku c++ compiler

Haiku gnu c++ compiler might be already installed by default. If not, install it.

Haiku OS: https://www.haiku-os.org

GNU c++: https://gcc.gnu.org

Install gnu c++ haiku

Update basic

Update haiku repos

pkgman full-sync
pkgman update

Search gcc

Search gnu c++ compiler

pkgman search gcc

Install gcc

Install gnu c++ compiler

pkgman install gcc

c++ code Editors

Haiku system cpp editors

Haiku system editors can be used to write c++

Kakoune cpp Editor

Kakoune is a console c++ code editor.

https://kakoune.org

You can install kakoune c++ editor to write c++.

pkgman install kakoune

Featherpad cpp Editor

Featherpad is a gui c++ code editor, written in c++ qt.

https://github.com/tsujan/FeatherPad

You can install featherpad c++ editor to write c++.

pkgman install featherpad

Check

Check if the c++ compiler works.

Copy paste the following c++ code, and save as hello.cpp:

#include <iostream>

int main()
{
	std::cout << "Hello, c++!" << std::endl;
}

Compile and run the c++ code:

g++ hello.cpp -std=c++23 -o hello
./hello

It should output:

Hello, c++!

If the haiku c++ compiler can not compile c++ code, find and repair issues, or ask for help.









________________________________________

Written on Nov 02, 2024

Up: c++ compilers

cpp/c++

c++ std::exception:

std::cout.write(err.data(), err.size());

std::cout << std::endl;

caught:

  ==================================================
  #        The c++ programming language.           #
  #                                                #
  #        Home: cppfx.xyz                         #
  #        E                                       #
  #        Join c++ Discord: yZcauUAUyC            #
  #        Deck                                    #
  ==================================================

PrevUpHome