Skip to content

Build Error: Invalid Use of WINDOW #36

Description

@jasonaepli

When attempting to build directly after cloning repo the following build errors are encountered:

CppND-System-Monitor/src/ncurses_display.cpp:75:56: error: invalid use of incomplete type ‘WINDOW’ {aka ‘struct _win_st’} │ 75 | mvwprintw(window, ++row, pid_column, (string(window->_maxx-2, ' ').c_str()));

CppND-System-Monitor/src/ncurses_display.cpp:85:54: error: invalid use of incomplete type ‘WINDOW’ {aka ‘struct _win_st’} │ 85 | processes[i].Command().substr(0, window->_maxx - 46).c_str());

CppND-System-Monitor/src/ncurses_display.cpp:98:45: error: invali│jaepli@jaepli-HP-Linux:~/SANDBOX/Udactiy/CppND-System-Monitor/src$ ls
d use of incomplete type ‘WINDOW’ {aka ‘struct _win_st’} │format.cpp main.cpp process.cpp system.cpp
98 | newwin(3 + n, x_max - 1, system_window->_maxy + 1, 0);

This build error can be resolved by use of getmaxx() and getmaxy() instead of _maxx and _maxy
Screenshot from 2024-12-28 19-58-20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions