Skip to content

Issue linking gbt_player when running makefile on macOS #37

Open
@martzgb

Description

I've been successfully building/running on macOS for a while now using changes very similar to this pull request: https://github.com/Zal0/ZGB/pull/32/files

However I've recently added music to my game, and I'm noticing this issue:

creating zgb.lib
Linking
?ASlink-Warning-Cannot open library module ../DebugColor/zgb/-e gbt_player.o

?ASlink-Warning-Undefined Global '_gbt_stop' referenced by module 'main'

?ASlink-Warning-Undefined Global '_gbt_enable_channels' referenced by module 'main'

?ASlink-Warning-Undefined Global '_gbt_play' referenced by module 'Music'

?ASlink-Warning-Undefined Global '_gbt_loop' referenced by module 'Music'

?ASlink-Warning-Undefined Global '_gbt_update' referenced by module 'Music'

The culprit seems to be some bad string concatenation with macOS make, where -e is in the wrong place: /zgb/-e gbt_player.o

I was able to work around this by removing the link to $(ZGB_PATH_UNIX)/lib/hUGEDriver.obj.o, and adding an explicitly linking $(OBJDIR_ZGB)/gbt_player.o instead. I can keep my copy of ZGB patched and rebase as new changes come out, since I already do this for gbm2c, gbr2c, and gbr2png binaries... But it would be nice if a fix were incorporated upstream since the makefile seems like fertile ground for merge conflicts.

Screen Shot 2021-12-01 at 4 08 56 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions