You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somewhere it is quoted:-o "/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/game"
and other places do not have quotes -L/ /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/sokol_app_macos_arm64_metal_release.a
Please provide detailed steps for reproducing the issue.
crate folder that contains spaces "/Users/gook/test stuff/"
use sokal or other foreign import with relative path
compile odin run . -show-system-calls
observe output, and missing quotes
Failure Logs
$: odin run . -show-system-calls
[SYSTEM CALL] ld-link
clang -Wno-unused-command-line-argument "/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/game.o" -o "/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/game" -Wl,-syslibroot /nix/store/4arb21xx2ympiqhv2d0x2zjgw481ibqp-MacOSX-SDK-11.0 -L/usr/local/lib -L/opt/homebrew/lib -lm -L/ /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/sokol_app_macos_arm64_metal_release.a -framework Cocoa -framework QuartzCore -framework Metal -framework MetalKit /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/gfx/sokol_gfx_macos_arm64_metal_release.a -framework Cocoa -framework QuartzCore -framework Metal -framework MetalKit /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/glue/sokol_glue_macos_arm64_metal_release.a /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/log/sokol_log_macos_arm64_metal_release.a -target arm64-apple-macosx -no-pie -e _main -Wl,-rpath,@loader_path
clang: error: no such file or directory: '/Users/gook/Library/Mobile'
clang: error: no such file or directory: 'Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/sokol_app_macos_arm64_metal_release.a'
clang: error: no such file or directory: '/Users/gook/Library/Mobile'
clang: error: no such file or directory: 'Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/gfx/sokol_gfx_macos_arm64_metal_release.a'
clang: error: no such file or directory: '/Users/gook/Library/Mobile'
clang: error: no such file or directory: 'Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/glue/sokol_glue_macos_arm64_metal_release.a'
clang: error: no such file or directory: '/Users/gook/Library/Mobile'
clang: error: no such file or directory: 'Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/log/sokol_log_macos_arm64_metal_release.a'
The text was updated successfully, but these errors were encountered:
justgook
changed the title
foreign import
foreign import in folder with spaces
Dec 19, 2024
I found the line: lib_str = gb_string_append_fmt(lib_str, " %.*s ", LIT(lib));
by replacing it with: lib_str = gb_string_append_fmt(lib_str, " \"%.*s\" ", LIT(lib));
Fixes issue.
need PR or deeper investigation?
Context
cannot build application if path to project folder contains spaces, when using
foreign import
sokol lib - have this foreign import:
it loads relative path from current file.
problem is that if you work in folder that contains spaces, flags for clang is partially quoted.
odin run . -show-system-calls [SYSTEM CALL] ld-link clang -Wno-unused-command-line-argument "/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/game.o" -o "/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/game" -Wl,-syslibroot /nix/store/4arb21xx2ympiqhv2d0x2zjgw481ibqp-MacOSX-SDK-11.0 -L/usr/local/lib -L/opt/homebrew/lib -lm -L/ /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/sokol_app_macos_arm64_metal_release.a -framework Cocoa -framework QuartzCore -framework Metal -framework MetalKit /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/gfx/sokol_gfx_macos_arm64_metal_release.a -framework Cocoa -framework QuartzCore -framework Metal -framework MetalKit /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/glue/sokol_glue_macos_arm64_metal_release.a /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/log/sokol_log_macos_arm64_metal_release.a -target arm64-apple-macosx -no-pie -e _main -Wl,-rpath,@loader_path
Somewhere it is quoted:
-o "/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/game"
and other places do not have quotes
-L/ /Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/sokol_app_macos_arm64_metal_release.a
odin report
output:Expected Behavior
path
/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/..
is ALWAYS quotedCurrent Behavior
path
/Users/gook/Library/Mobile Documents/com~apple~CloudDocs/Projects/odin-game/game/sokol/app/..
is not always quotedSteps to Reproduce
Please provide detailed steps for reproducing the issue.
foreign import
with relative pathodin run . -show-system-calls
Failure Logs
The text was updated successfully, but these errors were encountered: