Skip to content

X11 build of non-IA-32 emulator fails: x/gtk2/dialog_ide.c without SUPPORT_IDEIO #204

@OPNA2608

Description

@OPNA2608
[ 61%] Building C object CMakeFiles/xnp2kai_sdl2.dir/x/gtk2/dialog_ide.c.o
/build/source/x/gtk2/dialog_ide.c: In function 'ok_button_clicked':
/build/source/x/gtk2/dialog_ide.c:48:35: error: 'NP2CFG' {aka 'struct tagNP2Config'} has no member named 'idetype'
   48 |                         if (np2cfg.idetype[0] != i) {
      |                                   ^
/build/source/x/gtk2/dialog_ide.c:49:39: error: 'NP2CFG' {aka 'struct tagNP2Config'} has no member named 'idetype'
   49 |                                 np2cfg.idetype[0] = i;
      |                                       ^
/build/source/x/gtk2/dialog_ide.c:57:35: error: 'NP2CFG' {aka 'struct tagNP2Config'} has no member named 'idetype'
   57 |                         if (np2cfg.idetype[1] != i) {
      |                                   ^

...and so on.

SUPPORT_IDEIO define is only set in /CMakeLists.txt for the IA-32 X11 targets (xnp21kai*), not for the non-IA-32 target (xnp2kai*). /x/gtk2/dialog_ide.c is included for both targets, but only makes sense to compile when SUPPORT_IDEIO.

A workaround is to put:

#ifdef SUPPORT_IDEIO

...at the top, and:

#endif

...at the bottom of the file, essentially just stubbing it out when we don't actually build with IDE I/O support. But it might be nicer to instead treat this in /CMakeLists.txt as a file exclusive to the IA-32 X11 target.

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