Scintilla Library causes a link error

Mac OSX specific forum
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Scintilla Library causes a link error

Post by GedB »

Hi,

The following code is failing with a linker error.

Code: Select all

#MainWindow = 0
#MainWindowFlags = #PB_Window_SystemMenu | #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget
Enumeration 
  #TextEditor
EndEnumeration

  ProcedureDLL ScintillaCallBack(Gadget, *scinotify.SCNotification)
    ;
    ; The ProcedureDLL declaration is important for the callback to work correctly on MacOSX,
    ; on all other OS it has no effect.
    ;
  EndProcedure

If OpenWindow(#MainWindow, 100, 100, 500, 500, "Scire", #MainWindowFlags)

  If CreateGadgetList(WindowID(#MainWindow))

    ScintillaGadget(#TextEditor, 0, 0, 500, 500 , @ScintillaCallBack())

    CloseGadgetList()
  EndIf
  
  Repeat
    e = WaitWindowEvent()
  Until e = #PB_Event_CloseWindow
  
  CloseWindow(#MainWindow)
EndIf

If I comment out the scintillaGadget line it compiles OK.

The Sprite and Gadget examples work fine.

I'm running PB 4.10 on a PowerPc Mac Mini with OSX 10.4.10.

Any ideas?