Page 1 of 1

Mac OSX: Linker Error

Posted: Sat Feb 01, 2025 2:02 pm
by Guillaume
Hi.

I've just installed PureBasic 6.12 LTS - C Backend (arm64) on my MacBook Pro M1.

I'm testing the code example:

Code: Select all

;
; ------------------------------------------------------------
;
;   PureBasic - Window example file
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

;
; Open a window, and do some stuff with it...
;

If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)

  MessageRequester("Information", "Click to move the Window", 0)
  ResizeWindow(0, 200, 200, #PB_Ignore, #PB_Ignore)   ; Move the window to the coordinate 200,200
  
  MessageRequester("Information", "Click to resize the Window", 0)
  ResizeWindow(0, #PB_Ignore, #PB_Ignore, 320, 200) ; Resize the window to 320,200
  
  ;
  ; This is the 'event loop'. All the user actions are processed here.
  ; It's very easy to understand: when an action occurs, the Event
  ; isn't 0 and we just have to see what have happened...
  ;

  Repeat
    Event = WaitWindowEvent()

    If Event = #PB_Event_CloseWindow  ; If the user has pressed on the close button
      Quit = 1
    EndIf

  Until Quit = 1
  
EndIf

End   ; All the opened windows are closed automatically by PureBasic
While compiling, I get:

Code: Select all

PureBasic - Linker error
Undefined symbols for architecture arm64:
"_objc_msgSend$CountGadgetItems", referenced from:
_PB_CountGadgetItems in Gadget.a(CountGadgetItems.o)
"_objc_msgSend$FreeGadget", referenced from:
_PB_Gadget_Destroyed in Gadget.a(Gadget.o)
"_objc_msgSend$GadgetHeight", referenced from:
_PB_GadgetHeight2 in Gadget.a(GadgetHeight.o)
...
Thanks,
Guillaume

// Moved from "Bugs - Mac OSX" to "General Discussion" (Kiffi)

Re: Mac OSX: Linker Error

Posted: Sat Feb 01, 2025 7:39 pm
by mk-soft
Unusual, as many already use PureBasic on M1.

Which macOS Command Line Tools version is installed?

Re: Mac OSX: Linker Error

Posted: Fri Feb 07, 2025 11:04 am
by Guillaume
Hello,

After reinstalling the command lines tool, I confirm it now works,

Thanks,

Guillaume