Copying my JUCE project from PC to Mac for the first time - is this a good approach ..?

I’m finishing my plugin on my Windows PC, and now its time to install JUCE on my Mac and build it over there.
Are there any pitfalls I should be looking out for?

I’m installing Visual Studio 2020 (+Cocoa) over there. Its asking for Xcode install, which I postponed… wonder if I need that(?)

Question: Is it possible to simply install JUCE on the Mac and copy my PC projucer project and source files over there and expect it to pick up those pieces, or are there any special things I need to do?

You can skip VisualStudio and install Xcode instead. Don’t confuse VisualStudio with VisualCode.

XCode is not the greatest tool, but on mac it will give you the smoothest experience

90% it builds on mac too with minor corrections. Every compiler is slightly different.

Visual Studio and Xcode compilers interpret the code in a very similar way but one little stupid thing that made me waste a lot of time in my first time was that abs(int arg) only gets integer arguments in Xcode, while in Visual Studio abs(float arg) works. The fix is simple, just use fabs() with float arguments. Other than those small compiler differences JUCE makes the transition really smooth and we have to thank the JUCE devs for that!

I installed Visual Studio 2022, (I checked it wasn’t VisualCode).
I did ask to install Xcode as part of the VS install - it said some features might require it apparently.
My Mac OS is 12.3, Xcode requires 13, so I’ve not installed Xcode yet, I’ll have to update my OS.

@Qfactor - Hopefully using the same compiler - VisualStudio - on PC and Mac might minimize those issues.

I’d be surprised if you can get away with not using Xcode but let me know if you manage. Apple regularly releases updates to Xcode to target their latest devices (latest Apple silicon chips). I don’t think that Visual Studio compiles directly for Apple silicon but please let me know if I’m wrong.

You can get older versions of Xcode to run on older macOS. Currently running Big Sur 11.7.8 and Xcode 13.2.1

IDE != Compiler

From what I can tell Visual Studio on macOS is for .NET (C#) development, if it can handle C++ then it will likely use clang, and VS on PC uses MSVC compiler OOTB.

Never came across this issue, is it because you’re using straight abs and not std::abs?
std::abs is working cross platform and taking all relevant types as arguments without problems.

Ah, I see, OK.
I do have a few abs(), I’ll check if they are std::
It would be nice if there was a list somewhere of quirks between Xcode and VS.
Apparently one difference is the “scope” of variables.

You don’t have to use the XCode IDE at all on Mac. You can just install it to get the command line tools such as clang compiler. Likewise, on PC install Visual Studio to get the MSVC command line compiler and tooling.

I use CLion and CMake. VSCode works really well too except I moved away from it since the Intellisense struggles with Juce modules.

Point is, the same cross platform IDE to minimise context switching when developing. Switching between XCode and Visual Studio is a PITA.

2 Likes