arc80 / plywood

A multimedia development kit for C++

Home Page:https://plywood.arc80.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wrong path for libplywood_Instantiators.dylib on macos

sherjilozair opened this issue · comments

% plytool target add test
Initializing repo registry...
Error loading '/Users/sherjilozair/plywood/data/build/bootstrap/DLLs/build/Debug/libplywood_Instantiators.dylib':
dlopen(/Users/sherjilozair/plywood/data/build/bootstrap/DLLs/build/Debug/libplywood_Instantiators.dylib, 1): image not found

I get the above error. The dylib is present in the parent directory though: /Users/sherjilozair/plywood/data/build/bootstrap/DLLs/build/libplywood_Instantiators.dylib

Hello and thanks for reporting this. I also heard about this bug yesterday in the Discord chat.

This bug occurs when you initialize the workspace on macOS using -DPRESET=make due to bad logic in BuildInstantiatorDLLs.cpp. As a workaround, you can either:

  1. re-init the workspace using -DPRESET=xcode making sure you have the latest changes; or
  2. remove the cmakeOptions.buildType argument on line 169 of that file.

I'll work on a better fix. This issue is related to something else I'd like to add: a plytool run command that knows where the target executables are in every type of build folder.

I added a function getTargetOutputPath() with better logic for determining the output location of build targets. The issue should now be fixed.