I can either remove the OpenWindow() command or use a previous compiler (tested 5.73LTS) to make it end properly.
only tested with x64 compilers
Code: Select all
CompilerIf #PB_Compiler_ExecutableFormat = #PB_Compiler_DLL
;create a test.so
ProcedureDLL AttachProcess(Instance)
Global WinID, ButtonID
EndProcedure
ProcedureDLL OpenMyWindow()
WinID = OpenWindow(#PB_Any, 0, 0, 300, 200, "My Window", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
ButtonID = ButtonGadget(#PB_Any, 5, 5, 200, 24, "click me")
;BindEvent(#PB_Event_CloseWindow, @MyCloseWindow(), WinID)
;BindGadgetEvent(ButtonID, @MyButtonClick())
EndProcedure
ProcedureDLL DetachProcess(Instance)
EndProcedure
CompilerElse
;test the test.so
If OpenLibrary(0, "test.so") = 0
End
EndIf
Procedure main()
If OpenWindow(0, 0, 0, 400, 400, "Application", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
CloseWindow(0)
CloseLibrary(0)
Debug "WTF?"
EndIf
EndProcedure
main()
CompilerEndIf