Skip to content

Compile error when using Nim 2.2.4 #110

@ninovanhooff

Description

@ninovanhooff

When I use choosenim to install and activate Nim 2.0.10 everything works fine.

When I use choosenim to install and activate Nim 2.2.2 or 2.2.4, a compiler error is produced:

        ... /playdate_example/src/playdate_example.nim(154, 24) Error: attempting to call undeclared routine: 'setSerialMessageCallback'

The same issue also affects setMenuImage, where Nim expects the image to be of type LCDBitmapPtr. It therefore seems like it does not import src/playdate/system.nim but does import src/playdate/bindings/system.nim, where setmenuImage is defined with a BitmapPtr arg:

setMenuImage {.importc: "setMenuImage".}: proc (bitmap: LCDBitmapPtr;

The error is produced when using either pdn simulate or nimble simulate

Strangely, nimble test runs fine, even though t_system.nim does reference setMenuImage (albeit in an inactive codepath since runnable is false when running unit tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions