blitz-research/monkey2

Linker error with RequestDir

Closed this issue · 2 comments

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)

Thanks, no linker error anymore. 👍