Mac OSX: Linker Error

Mac OSX specific forum
Guillaume
New User
New User
Posts: 2
Joined: Sat Feb 01, 2025 1:57 pm

Mac OSX: Linker Error

Post 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)
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Mac OSX: Linker Error

Post by mk-soft »

Unusual, as many already use PureBasic on M1.

Which macOS Command Line Tools version is installed?
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Guillaume
New User
New User
Posts: 2
Joined: Sat Feb 01, 2025 1:57 pm

Re: Mac OSX: Linker Error

Post by Guillaume »

Hello,

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

Thanks,

Guillaume
Post Reply