Amalgamate icon indicating copy to clipboard operation
Amalgamate copied to clipboard

How to run this under OSX?

Open logsol opened this issue 9 years ago • 3 comments

So far, you only provide visual studio build settings. What steps would be necessary to compile this under OSX?

logsol avatar Aug 01 '15 08:08 logsol

+1 *BSD/Linux/Solaris?

ben-crowhurst avatar Sep 09 '15 12:09 ben-crowhurst

Here's how I got this to build on macOS Catalina with Xcode 11.4:

  • Create a new "Command Line Tool" project in Xcode
  • Delete main.cpp from the project
  • Drag the following files into the Project navigator, with "Copy items if needed" checked, and make sure they are added to the "target"
    • Amalgamate.cpp
    • AppConfig.h
    • juce_core_amalgam.cpp
    • juce_core_amalgam.h
    • (Do not include juce_core_amalgam.mm)
  • In the Project navigator, rename juce_core_amalgam.cpp to juce_core_amalgam.mm
  • In the project's Build Settings, under "Apple Clang - Language - Objective-C" change "Objective-C Automatic Reference Counting" from Yes to No
  • In the General settings for the target, under "Frameworks and Libraries" add Cocoa.framework

Build the project! If all goes well, Xcode should say "Build Succeeded"

Within the Project navigator, under the Products folder, you'll see the executable. Right click on it and "Show in Finder" to find it. Copy this file to wherever you want to use it. To run it in a terminal, you may need to change its access permissions first. For example if the executable is called Amalgamate, run chmod 755 Amalgamate.

pejalo avatar May 30 '20 16:05 pejalo

+1 *BSD/Linux/Solaris?

g++ juce_core_amalgam.cpp Amalgamate.cpp -o amalgamate -lstdc++ -lpthread -ldl

redthing1 avatar Feb 12 '22 22:02 redthing1