pierreguillot / Camomile

An audio plugin with Pure Data embedded that allows to load and to control patches
GNU General Public License v3.0
909 stars 63 forks source link

Compiling Camomile with Else externals lib on OSx #214

Closed emviveros closed 3 years ago

emviveros commented 3 years ago

Hi! I'm trying to compile camomile with support to Else library by @porres.

I'm following the instructions in the video on: https://github.com/pierreguillot/Camomile/issues/138#issuecomment-628092966

After add all objects of Else lib and add manually the folder with some Else dependencies headers manually in Xcode project before start compile failed. And after (525 warnings), it return one fatal issue:

ld: library not found for -lpd-multi
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Captura de Tela 2020-10-04 às 17 28 20

The system is a Macbook Pro 2011, OSx 10.13.6 High Sierra. Xcode 10.2.1. Projucer JUCE v6.0.1 Build date: 7 Jul 2020.

Now I will describe all steps I took (maybe can be used to create documentation in future):

  1. Cloned pdlib repository

    git clone --recurse-submodules https://github.com/libpd/libpd.git
  2. Cloned camomile repository

    git clone --recursive https://github.com/pierreguillot/Camomile.git
  3. Added the sources of Else library in the fresh created folder <projectFolder>/camomile/Source/Pd/Externals. I added 238 c sources and 1 folder named shared with some dependencies to build Else library. in the shared folder are 6 sources codes (.c files) and it's respective headers (.h files).

  4. Opened the files CamomileFx.jucer, CamomileLV2.jucer, Camomile.jucer in Projucer and manually add the the Externals folder in each project and save the project and build the Xcode workspace project file. (described at 40s of the video reference)

  5. After opened the Xcode workspace generated in file Camomile.xcworkspace I added each object in x_libpd_multi.c file. Like described in video reference at 3:10.

  6. Added <projectFolder>/camomile/Source/Pd/Externals/shared in Xcode Headers Path: 6.1 Clicking in the root tree of project: root_tree 6.2 Clicking in "Build Settings": build Settings 6.3 and in Search Path -> Header Search Path I added $SRCROOT/Source/Pd/Externals/shared in Debug and Releases fields (it solved issues relative to headers not found from else dependencies): Captura de Tela 2020-10-04 às 18 35 01

  7. Uncheck include_juce_audio_plugin_client_AU.r files option in Xcode project like described in video reference at 2:10.

  8. After that I tried to build Camomile (Cmmd+B) and have the error described above.

Any advance are welcomed and I'm at disposal for all tests needed.

Lucarda commented 3 years ago

its a preprocessor definition. may just add -DCAMOMILE on the box above?

Lucarda commented 3 years ago

or just CAMOMILE in the preprocessor box?

pierreguillot commented 3 years ago

Click on the "bolt" button, go to the section "Preprocessor Definition" add "CAMOMILE=1". In the sources use "#ifdef CAMOMILE".

These are more global programming/juce questions. Please, create a fork and/or specific issues.

emviveros commented 3 years ago

Pierre, I updated the Procedure to Compile Camomile with ELSE and created a fork to share it workflow automatically in:

porres commented 3 years ago

@alfonso73 - do you think you can help us compile for windows? See https://github.com/pierreguillot/Camomile/issues/215

alfonso73 commented 3 years ago

@porres Hi Alexandre, yes i'll surely take a look. But I'll be very busy 'til first days of November so there is very little i can do before. I'll begin compiling "plain" Camomile starting from the projucer project. Is there any other issue you' ve encountered in process of building else+Camomile on OSX?

emviveros commented 3 years ago

@alfonso73 I'm working in compile camomile in windows to learn how to compile camomile-else to... When you can help with any advance do here: https://github.com/pierreguillot/Camomile/issues/215#issuecomment-712411225

Thanks! :)