Compile and build as you would usually do in sublime text (cmd+b/cmd+shift+b) and this time it would build using brew's g++. Save this file using cmd+s and restart sublime text. After that open command palette and open "PackageResourceViewer: Open resource".įinally replace all g++ with the location we copied earlier (/opt/homebrew/bin/g++-11). Open sublime text and install "PackageResourceViewer" from Package Control. Copy this location ( Mine was something like - /opt/homebrew/bin/g++-11 ). Now type the command "which g++-11" to get the location where g++-11 got installed. So I tried searching how to use brew's g++ as default build in Sublime Text without breaking anything but couldn't find anything.Īfter that install gcc using the command in terminal "brew install gcc".Ĭheck if install is complete using command "gcc-11 -version" (I got gcc-11 installed, in future you may use gcc-12,gcc-13 etc). There are many things that I find missing in default C++ build in Mac Sublime Text(clang) like no bits/stdc++.h header, regular warnings on using auto keyword, using inline comparator functions etc.
0 Comments
Leave a Reply. |