If you would like to revert back to original g++, just go back to C++ Single file build and change "/opt/homebrew/bin/g++-11" to "g++" wherever applicable. Cross-compiling C++ Linux applications using Microsoft Visual Studio can be a daunting task for many developers, especially those who are not familiar with the intricacies of the Windows and Linux operating systems. 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. To get started, download Xcode via the macOS App Store, open Xcode, create new project, choose Command Line Tool, select C++ as the programming language. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |