Linker error with RequestDir
Closed this issue · 2 comments
D-a-n-i-l-o commented
The following code produces a linker error "missing symbols" on macOS using the Desktop target.
#Import "<std>"
Function Main()
Local directory:String = std.requesters.RequestDir( "Select directory", "/" )
Print directory
End
Adding the following line to the code above fixes the linker error:
#Import "<mojo>"
The error message:
Undefined symbols for architecture x86_64:
"_CFRelease", referenced from:
bbRequesters::OpenUrl(bbString) in std.a(macos623863f4.mm.o)
"_CFURLCreateWithBytes", referenced from:
bbRequesters::OpenUrl(bbString) in std.a(macos623863f4.mm.o)
"_LSOpenCFURLRef", referenced from:
bbRequesters::OpenUrl(bbString) in std.a(macos623863f4.mm.o)
"_NSApp", referenced from:
(anonymous namespace)::beginPanel() in std.a(macos623863f4.mm.o)
blitz-research commented
Ok, I've pushed a fix for this.
I recommend #importing mojo anyway (and adding New AppInstance at the top
of main) otherwise the directory requester won't have initial focus (well
it doesn't here, I'm guessing because a std app is not a gui app, it's just
a console app).
…On Sun, Jan 13, 2019 at 2:48 AM Danilo Krahn ***@***.***> wrote:
The following code produces a linker error "missing symbols" on macOS
using the Desktop target.
`#Import ""
Function Main()
Local directory:String = std.requesters.RequestDir( "Select directory", "/" )
Print directory
End`
Adding the following line to the code above fixes the linker error:
#Import "<mojo>"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#449>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADU3Qh0fdPhYKzKH9tqQH9Ovgm4t2Jrxks5vCeehgaJpZM4Z8qki>
.
D-a-n-i-l-o commented
Thanks, no linker error anymore. 👍