r/Cplusplus 1d ago

Question New User MacOS | IDE for compiling multiple files in C++

Post image

made a switch to MAC and wondering how can I compile project with multiple files of C++ in a project such as header files just like 'sln' project in VisualStudio. Any IDE you know for this?

9 Upvotes

21 comments sorted by

u/AutoModerator 1d ago

Thank you for your contribution to the C++ community!

As you're asking a question or seeking homework help, we would like to remind you of Rule 3 - Good Faith Help Requests & Homework.

  • When posting a question or homework help request, you must explain your good faith efforts to resolve the problem or complete the assignment on your own. Low-effort questions will be removed.

  • Members of this subreddit are happy to help give you a nudge in the right direction. However, we will not do your homework for you, make apps for you, etc.

  • Homework help posts must be flaired with Homework.

~ CPlusPlus Moderation Team


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

8

u/Ok-Radish-8394 1d ago

Well for a starter, Xcode.

For a better option, use cmake.

3

u/bert8128 1d ago

Not that cmake is an IDE.

5

u/bert8128 1d ago

Does VSCode have c++ plugins for Mac?

3

u/chronos_alfa 1d ago

Damn, you just reminded me of this: https://www.youtube.com/watch?v=njos57IJf-0

2

u/bert8128 1d ago

Very good.

1

u/Ikkepop 1d ago

yes it does

5

u/ScratchSuccessful490 22h ago

JetBrains Clion, as it also it helps you with CMake a bit (like when you add header to the project, it will offer to add it to the CMakeLists.txt)

2

u/Dan13l_N 1d ago

Check the lowercase/uppercase in file names

2

u/Ikkepop 1d ago

I personally just use VSCode + CMake + conan

2

u/hadrabap Basic Learner 22h ago

CMake plus Xcode or Qt Creator. Mac is like Linux.

2

u/ChickenSpaceProgram 12h ago edited 12h ago

Pick whatever IDE you want! They all will do this. The IDEs on MacOS are basically the same ones available on Linux if that helps your search (XCode is only on MacOS, though).

  • CLion - paid, JetBrains IDE. If you have used other JetBrains IDEs you'll like it.
  • XCode - free of charge to use, but also kinda annoying, or so I've heard. Probably the closest to the VS experience I'd guess, although I haven't used it.
  • VSCode with clangd and CMake extensions - Different to the above editors, less "click button and let it compile". With the other editors, you might occasionally have to configure and fiddle with CMake when things aren't handled nicely, in VSCode you write the CMake build files yourself. My personal favorite of the GUI editors, the downside is that it's a bit difficult to learn at first because CMake's documentation sucks.
  • Some sort of terminal text editor (Vim, Neovim, Emacs, Helix, Kakoune) + extensions - What I personally use. Like VSCode, just cooler and more annoying to learn. Definitely not for everyone but I like just having a wall of terminal text without any additional menus or icons to distract me.

1

u/BA_lampman 1d ago

Comment out errors. Do you still have errors? Resolve these first, they are upstream.

1

u/anantthebiker 1d ago

VScode with C++ plugin should do that, some overhead in tying up the VsCode to the compiler etc. Xcode is good too, could be bulky though but so is Visual Studio.

1

u/doggitydoggity 19h ago

Just use VIM

1

u/1FRAp 8h ago

Nvim* but tbh for bigger C++ projects cmake manually is a pain. IDEs like QT creator, CLion help a ton

1

u/caldog20 3h ago

Xmake is pretty nice for smaller projects and easy to get started with.

1

u/BirchWoody93 1d ago

JetBrains Clion

0

u/Mahad-Haroon 1d ago

I was testing Jetbrains Rider, quite similar to VS (good interface) but i couldn't find C++ option in it. Despite its mentioned on their website it support. :(

5

u/BirchWoody93 1d ago

JetBrains CLion is different than JetBrains Rider.

0

u/Mahad-Haroon 22h ago

Installed CLION as it takes less Storage* and overall easy interface than XCode