3

A lot of people can't seem to get G++ working on macOS, here's a blog to help wi...

 1 year ago
source link: https://codeforces.com/blog/entry/115359
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

By ismailfateen, 116 minutes ago,

Hello, there seems to be a lot of CLion users on macOS who cannot seem to set CLion to use G++ instead of clang++

As we all know G++ is the preferred compiler for competitive programmers as it has a lot to offer (for example bits/stdc++.h, and the Policy Based Data Structures such as ordered_sets)

So, here's a guide to get G++ working on macOS! Firstly, you need to ensure homebrew is installed, you can install it from https://brew.sh After installing it, and adding it to your path, execute the command brew install gcc After executing this and refreshing your terminal. Make sure you now have access to the commands gcc-12 and g++-12 After ensuring they are available, open CLion settings, go to Build, Execution, Deployment -> Toolchains set the build tool to /usr/bin/make, C compiler to whatever the terminal says after executing whereis gcc-12, and C++ compiler to whatever the terminal says after executing whereis g++-12, for example, in my laptop it was these paths: /usr/bin/make , /opt/homebrew/bin/gcc-12 , /opt/homebrew/bin/g++-12

After refreshing CLion, you should be able to be a GCC enjoyer!

I hope that helps someone :D


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK