gdext: Error loading extension: res//DodgeTheCreeps.gdextension

I’ve tried to run DodgeTheCreeps demo on M1 Macbook Pro. The project built and the game started, but nothing happened after clicking the “START” button inside the game and following errors appeared:

Can't open dynamic library: /Users/mareksubocz/it/gdext/examples/dodge-the-creeps/godot/../../../target/debug/libdodge_the_creeps.dylib, error: dlopen(/Applications/Godot.app/Contents/MacOS/../Frameworks/libdodge_the_creeps.dylib, 0x0002): tried: '/Applications/Godot.app/Contents/MacOS/../Frameworks/libdodge_the_creeps.dylib' (no such file).
  core/extension/gdextension.cpp:400 - GDExtension dynamic library not found: /Users/mareksubocz/it/gdext/examples/dodge-the-creeps/godot/../../../target/debug/libdodge_the_creeps.dylib
  Failed loading resource: res://DodgeTheCreeps.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  Can't open dynamic library: /Users/mareksubocz/it/gdext/examples/dodge-the-creeps/godot/../../../target/debug/libdodge_the_creeps.dylib, error: dlopen(/Applications/Godot.app/Contents/MacOS/../Frameworks/libdodge_the_creeps.dylib, 0x0002): tried: '/Applications/Godot.app/Contents/MacOS/../Frameworks/libdodge_the_creeps.dylib' (no such file).
  core/extension/gdextension.cpp:400 - GDExtension dynamic library not found: /Users/mareksubocz/it/gdext/examples/dodge-the-creeps/godot/../../../target/debug/libdodge_the_creeps.dylib
  Failed loading resource: res://DodgeTheCreeps.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

The steps I took to set the project up were:

brew install godot
git clone https://github.com/godot-rust/gdext && cd gdext
export GODOT4_BIN=/Applications/Godot.app/Contents/MacOS/Godot
export LLVM_PATH=/Library/Developer/CommandLineTools/usr/bin
cargo build # successfully
cd examples/dodge-the-creeps
cargo build # successfully
godot # to run the game

Is there something I overlooked?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Happy to hear it worked 🙂 Also, if you encounter more questions in the future, feel free to join or Discord, can sometimes be a bit faster 😎

If you don’t mind, I will keep this issue open until I added support for aarch64 architecture on macOS. Thanks a lot for reporting!

I am currently using the latest commit. I don’t know what those hashes mean, but i reverted all changes and compiled everything again and, despite still seeing some warnings, everything worked and I was able to play the game! Thank you so much 😄 Love the support of this project! The issue is ready to close.

architecture is arm64.

DodgeTheCreeps.gdextension:

[configuration]
entry_symbol = "gdext_rust_init"

[libraries]
linux.debug.x86_64 = "res://../../../target/debug/libdodge_the_creeps.so"
linux.release.x86_64 = "res://../../../target/release/libdodge_the_creeps.so"
macos.debug = "res://../../../target/debug/libdodge_the_creeps.dylib"
macos.release = "res://../../../target/release/libdodge_the_creeps.dylib"
windows.debug.x86_64 = "res://../../../target/debug/dodge_the_creeps.dll"
windows.release.x86_64 = "res://../../../target/release/dodge_the_creeps.dll"
macos.debug.arm64 = "res://../../../target/aarch64-apple-darwin/debug/libdodge_the_creeps.dylib"
macos.release.arm64 = "res://../../../target/aarch64-apple-darwin/release/libdodge_the_creeps.dylib"

saving the scenes triggers the same warnings. Do you want me to paste the outputs of godot4 -e? It doesn’t fix the warnings.