dariomanesku/cmftStudio

OSX build broken (fix in comment)

Opened this issue · 4 comments

Tried to build using make osx-release64 but got multiple "duplicate symbol" errors from the linker. Fixed by hand editing cmftStudio.make to exclude three files in a couple places:

$(OBJDIR)/dependency/bgfx/src/glcontext_eagl.o \
$(OBJDIR)/dependency/bgfx/src/glcontext_nsgl.o \
$(OBJDIR)/dependency/bgfx/src/renderer_mtl.o \

Those are already included in the amalgamation.mm file. Don't know if cmftStudio.make is the right place to fix this, but doing this helped me get a working build.

(After fixing the build this way the result was a broken/incomplete Mac app bundle. I had to do "Show contents" in Finder and manually launch the binary file inside, which worked.)

I guess it'll help.

On a fresh clone from master this still seems to happen?
And regarding the app bundle validity, the issue is the name of the binary is determined by the name of the bundle - unless you have an info.plist saying otherwise. This means the bundle expects to find cmftStudio and doesn't.

TARGET = $(TARGETDIR)/cmftStudio

Setting this line to remove the cmftStudioRelease makes the bundle function as intended.

I don't have access to an OSX at hand so I can't investigate this. Send a pull request if this is still relevant.