10000 some code under examples/clr can't be compiled · Issue #89 · khchen/winim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
some code under examples/clr can't be compiled  #89
Open
@retsyo

Description

@retsyo

I am using latest clone-and-built nim and winim package.

$ nim
Nim Compiler Version 1.7.1 [Windows: amd64]
Compiled at 2022-08-16
Copyright (c) 2006-2022 by Andreas Rumpf

$ nimble install wnim
Downloading https://github.com/khchen/wNim using git
  Verifying dependencies for wnim@0.13.1
   Warning: No .nimble or .nimble-link file found for C:\Users\Lenovo\.nimble\pkgs\inim-0.6.1
 Installing winim@>= 3.6.0
Downloading https://github.com/khchen/winim using git
  Verifying dependencies for winim@3.8.1

#However, code_compiler.nim, simple_gui.nim, usage_demo2.nim can't be compiled
for example, for winim/examples/clr/simple_gui.nim, I get

$ nim c -r simple_gui.nim
Hint: used config file 'E:\msys64\home\USER\_nim\nim\config\nim.cfg' [Conf]
Hint: used config file 'E:\msys64\home\USER\_nim\nim\config\config.nims' [Conf]
...............................................................................................................................
E:\my_project\aardio\winform_miniexcel\simple_gui.nim(31, 51) Error: type mismatch: got <proc (sender: ptr IUnknown){.stdcall, locks: <unknown>.}>
but expected one of:
proc `[]`(s: mstring; i: int): char
  first type mismatch at position: 0
proc `[]`(s: mstring; i: mIndex): mstring
  first type mismatch at position: 0
proc `[]`(s: string; i: BackwardsIndex): char
  first type mismatch at position: 0
proc `[]`(s: var string; i: BackwardsIndex): var char
  first type mismatch at position: 0
proc `[]`(s: wstring; i: int): WCHAR
  first type mismatch at position: 0
proc `[]`(self: variant; name: string): variant
  first type mismatch at position: 0
proc `[]`(v: CLRVariant; i: SomeOrdinal): CLRVariant
  first type mismatch at position: 0
proc `[]`(v: CLRVariant; name: string): CLRVariant
  first type mismatch at position: 0
proc `[]`[I: Ordinal; T](a: T; i: I): T
  first type mismatch at position: 0
proc `[]`[Idx, T; U, V: Ordinal](a: array[Idx, T]; x: HSlice[U, V]): seq[T]
  first type mismatch at position: 0
proc `[]`[Idx, T](a: array[Idx, T]; i: BackwardsIndex): T
  first type mismatch at position: 0
proc `[]`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex): var T
  first type mismatch at position: 0
proc `[]`[T, U: Ordinal](s: string; x: HSlice[T, U]): string
  first type mismatch at position: 0
proc `[]`[T, U](s: mstring; x: HSlice[T, U]): mstring
  first type mismatch at position: 0
proc `[]`[T, U](s: wstring; x: HSlice[T, U]): wstring
  first type mismatch at position: 0
proc `[]`[T: variant | SomeNumber | string](x: T): CLRVariant
  first type mismatch at position: 0
proc `[]`[T; U, V: Ordinal](s: openArray[T]; x: HSlice[U, V]): seq[T]
  first type mismatch at position: 0
proc `[]`[T](s: openArray[T]; i: BackwardsIndex): T
  first type mismatch at position: 0
proc `[]`[T](s: var openArray[T]; i: BackwardsIndex): var T
  first type mismatch at position: 0
proc `[]`[T](x: T; typ: CLRVariant): CLRVariant
  first type mismatch at position: 0
template `[]`(s: string; i: int): char
  first type mismatch at position: 0
template `[]`(self: com; name: string): variant
  first type mismatch at position: 0

expression: `[]`(eventHandler)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0