Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iMacker20

macrumors newbie
Original poster
May 12, 2020
13
6
Download link: GCC 14

installer.png


This is an installer for GCC 14 x86. It works on these operating systems:
- Mac OS 10.4
- Mac OS 10.5
- Mac OS 10.6
- Mac OS 10.7

It will create x86 (32-bit software).

This is what comes with the installer:
- cctools
- gcc_select
- gettext-runtime
- gmp
- isl
- ld64
- ld64-97
- libgcc
- libgcc14
- libiconv
- libmpc
- lz4
- mpfr
- xz
- zlib
- zstd
- gcc14

It installed to /opt/local/bin/.
The compiler itself is named g++-mp-14.
It implements C++23 and C++26 features.
This can be shortened to g++ by using the alias command like this: alias g++=/opt/local/bin/g++-mp-14
If you want to make this change permanent, add the above command to your ~/.profile file.

Setup Directions:
Open the Terminal.
Use this command to open the ./profile file: pico ~/.profile
Then add this command to the file: alias g++=/opt/local/bin/g++-mp-14
Use Control-o to save your changes.
Use Control-x to exit the program.

How to use:
/opt/local/bin/g++-mp-14 -o program -std=c++23 main.cpp && ./program

Example:
Save this program to a file called main.cpp and run the command above.

Code:
#include <print>

int main()
{
    std::println("Hello from C++23");
    return 0;
}

You should see the output "Hello from C++23".

Enjoy!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.