kcvinker / Winforms

A simple GUI library for Odin programming language.
45 stars 2 forks source link

exmple compile issues #2

Open apocalyptic7 opened 2 months ago

apocalyptic7 commented 2 months ago

pulled the latest changes. can't build example app.odin with odin build .

got the following D:/Dev/Odin/Odin/core/sys/windows/gdi32.odin(15:15) Error: Redeclaration of foreign procedure 'SetBkMode' with different type signatures at D:/Dev/Odin/Sources/Winforms/winforms/api_procs.odin(263:29) SetBkMode :: proc(hdc: HDC, mode: BKMODE) -> INT --- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:/Dev/Odin/Sources/Winforms/winforms/trayicon.odin(69:49) Error: Cannot assign value 'int(pt.x)' of type 'int' to 'i32' in a procedure argument ... dle, 2, int(pt.x), int(pt.y), 0, this.contextMenu._dummyHwnd, n ... ^~~~~~~~^ D:/Dev/Odin/Sources/Winforms/winforms/trayicon.odin(69:60) Error: Cannot assign value 'int(pt.y)' of type 'int' to 'i32' in a procedure argument ... e, 2, int(pt.x), int(pt.y), 0, this.contextMenu._dummyHwnd, nil) ^~~~~~~~^ D:/Dev/Odin/Odin/core/sys/windows/user32.odin(154:21) Error: Redeclaration of foreign procedure 'InsertMenuItemW' with different type signatures at D:/Dev/Odin/Sources/Winforms/winforms/api_procs.odin(189:35) ... temW :: proc(hmenu: HMENU, item: UINT, fByPosition: BOOL, lpmi: ... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... D:/Dev/Odin/Sources/Winforms/winforms/menu.odin(584:58) Error: Cannot assign value 'int(pt.x)' of type 'int' to 'i32' in a procedure argument ... handle, TPM_FLAG, int(pt.x), int(pt.y), 0, this._dummyHwnd, nil) ^~~~~~~~^ D:/Dev/Odin/Sources/Winforms/winforms/menu.odin(584:69) Error: Cannot assign value 'int(pt.y)' of type 'int' to 'i32' in a procedure argument ... handle, TPM_FLAG, int(pt.x), int(pt.y), 0, this._dummyHwnd, nil) ^~~~~~~~^ D:/Dev/Odin/Sources/Winforms/winforms/menu.odin(585:18) Error: Cannot convert '0' to 'b32' from 'untyped integer', got 0 if mid > 0 { ^

kcvinker commented 2 months ago

Please try with latest files. The dev version 2024-08 contains some updates for windows api function declarations. Please post your issues after trying with latest winforms. And please include your odin version also.