Skip to content

Build fails on Linux: missing <functional> include and unsupported-platform #error #6

Description

@ajfa

Two small things stop a Linux build (tested on Ubuntu 22.04, GCC 11.4, Qt 5.15).

1. WindCore/arm710.h misses #include <functional>

The header uses std::function:

void setLogger(std::function<void(const char *)> newLogger) { logger = newLogger; }
...
std::function<void(const char *)> logger;

but only includes <stdint.h>, <optional> and <variant>. With older
libstdc++ this compiled because <optional> pulled <functional> in
transitively; with GCC 11 it does not, and the build fails. Adding the explicit
include fixes it.

2. WindQt/pdascreenwindow.cpp cannot build on non-Windows, non-macOS hosts

#error "Unsupported platform (for now! fix me in pdascreenwindow.cpp)"
static EpocKey resolveKey(int key) {

Besides the #error, the placeholder resolveKey in that branch takes one
argument while both call sites pass two:

EpocKey k = resolveKey(event->key(), event->nativeVirtualKey());

so removing the #error alone is not enough — the fallback also needs the
two-argument signature. With both changed, WindQt builds and runs on
Linux/X11 (we used it under WSLg).

Keyboard mapping on the fallback path is obviously not correct; this is only
about the build.


Reported by @ajfa, with Claude (Anthropic) assisting.

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