I have the following function in the file winui_opts.h:
class winui_ui_options
{
	std::map<std::string, std::string> m_list;
	const char *m_filename;

	void create_index(std::ifstream &fp)
	{
		if (!fp.good())
			return;
		bool is_ready = false;
		std::string file_line;
		std::getline(fp, file_line);
		while (fp.good())
		{
			if (is_ready)
			{
				char *s = (char *) malloc(file_line.length()+1);
				strcpy(s, file_line.c_str());

				const char* name = strtok(s, "\t");  // get adjustment name
				char* data = strtok(NULL, "\t");    // get next part (there's no next tab, so just return whatever is left)
				if (name)
					m_list[name] = data ? data : "";
			}
			else
			{
				if (file_line == "$start")
					is_ready = true;
			}

			std::getline(fp, file_line);
		}

		fp.close();
		return;
	}

	bool ends_with_filter(const std::string &str)
	{
		string ending = "_filters";
		u8 endl = ending.length();
		u8 strl = str.length();
		if (strl < endl)
			return false;
		return str.compare(strl - endl, endl, ending) == 0;
	}

public:
	// construction/destruction
	winui_ui_options()
	{
		// set up default values
		for (int i = 0; option_entries[i].name != "$end"; i++)
			m_list[option_entries[i].name] = option_entries[i].value;
		//printf("*** START DUMP OF DEFAULT ***\n");
		//for (auto const &it : m_list)
		//	printf("%s = %s\n", it.first.c_str(), it.second.c_str());
		//printf("*** END DUMP OF DEFAULT ***\n");
	}

	void load_file(const char *filename)
	{
		if (!m_filename)
			m_filename = filename;
		std::ifstream infile (filename);
		create_index(infile);
	}

	void save_file(const char *filename)
	{
		if (!filename)
			return;
		std::string inistring = std::string("\nYOU CAN SAFELY DELETE THIS FILE TO RESET THE EMULATOR BACK TO DEFAULTS.\n\n$start\n");
		for (auto const &it : m_list)
			inistring.append(it.first).append("\t").append(it.second).append("\n");

		std::ofstream outfile (filename, std::ios::out | std::ios::trunc);
		size_t size = inistring.size();
		char *t1 = (char *) malloc(size+1);
		strcpy(t1, inistring.c_str());
		outfile.write(t1, size);
		outfile.close();
		return;
	}

	void reset_and_save(const char *filename)
	{
		// set up default values
		for (int i = 0; option_entries[i].name != "$end"; i++)
			m_list[option_entries[i].name] = option_entries[i].value;

		save_file(filename);
	}

	void setter(const char* name, std::string value)
	{
		m_list[name] = value;
		save_file(m_filename);
	}

	// cannot be "setter" otherwise most strings use it, causing "1" to be saved.
	//void bool_setter(const char* name, bool value)
	//{
	//	m_list[name] = value ? "1" : "0";
	//	save_file(m_filename);
	//}

	void setter(const char* name, int value)
	{
		u8 s_write = 3;
		// filters: only want an entry if a filter is applied
		if (ends_with_filter(name))
		{
			if (value == 0)
			{
				if (m_list.find(name) == m_list.end())
					s_write = 0; // there is no entry so do nothing
				else
					s_write = 2; // delete the existing entry
			}
		}
		if (s_write)
		{
			if (s_write == 2)
				m_list.erase(m_list.find(name)); // delete
			else
				m_list[name] = std::to_string(value); // add or update

			save_file(m_filename);
		}
	}

	std::string getter(const char* name)
	{
		if (m_list.count(name))
			return m_list.find(name)->second;
		else
			return "";
	}

	int int_value(const char* name)
	{
		string t = getter(name);
		if (t.empty())
			return 0;
		else
			return std::atoll(t.c_str());
	}

	bool bool_value(const char* name)
	{
		return int_value(name) ? 1 : 0;
	}
};


And the following function in the file winui_opts.cpp:

typedef struct
{
	std::string                      name;      // name of the option
	std::string                      value;     // initial value if ini file not found
	const core_options::option_type  unused1;   // option type (unused)
	char*                            unused2;   // help text (unused)
}
WINUIOPTS;
// UI options in MAMEui.ini
const WINUIOPTS option_entries[] =
{
	{ MUIOPTION_OVERRIDE_REDX,                "0",        core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_DEFAULT_GAME,                 MUIDEFAULT_SELECTION, core_options::option_type::INTEGER,       NULL },
	{ MUIOPTION_DEFAULT_FOLDER_ID,            "12",       core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_FULL_SCREEN,                  "0",        core_options::option_type::BOOLEAN,                 NULL },
	{ MUIOPTION_CURRENT_TAB,                  "14",       core_options::option_type::STRING,                  NULL },
	{ MUIOPTION_SHOW_TOOLBAR,                 "1",        core_options::option_type::BOOLEAN,                 NULL },
	{ MUIOPTION_SHOW_STATUS_BAR,              "1",        core_options::option_type::BOOLEAN,                 NULL },
	{ MUIOPTION_HIDE_FOLDERS,                 "available,clones,horizontal,lightgun,mechanical,nonworking,raster,samples,savestate,trackball,vertical,working", core_options::option_type::STRING,                  NULL },
	{ MUIOPTION_SHOW_TABS,                    "1",        core_options::option_type::BOOLEAN,                 NULL },
	{ MUIOPTION_HIDE_TABS,                    "artpreview,boss,cabinet,cpanel,cover,end,flyer,gameover,howto,logo,marquee,pcb,scores,select,title,versus,history", core_options::option_type::STRING, NULL },
	{ MUIOPTION_HISTORY_TAB,                  "14",       core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_SORT_COLUMN,                  "0",        core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_SORT_REVERSED,                "0",        core_options::option_type::BOOLEAN,                 NULL },
	{ MUIOPTION_WINDOW_X,                     "0",        core_options::option_type::INTEGER,                 NULL },  // main window position, left
	{ MUIOPTION_WINDOW_Y,                     "0",        core_options::option_type::INTEGER,                 NULL },  // main window position, top
	{ MUIOPTION_WINDOW_WIDTH,                 "2000",     core_options::option_type::INTEGER,                 NULL },  // main window width
	{ MUIOPTION_WINDOW_HEIGHT,                "690",      core_options::option_type::INTEGER,                 NULL },  // main window height
	{ MUIOPTION_WINDOW_STATE,                 "1",        core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_WINDOW_PANES,                 "15",       core_options::option_type::INTEGER,                 NULL },  // which windows are visible: bit 0 = tree, bit 1 = list, bit 2 = sw, bit 3 = images
	{ MUIOPTION_TEXT_COLOR,                   "192,192,192", core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_CLONE_COLOR,                  "-1",       core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_CUSTOM_COLOR,                 "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", core_options::option_type::STRING, NULL }, // colour codes of the 16 custom colours (set in clone font dialog)
	/* ListMode needs to be before ColumnWidths settings */
	{ MUIOPTION_LIST_MODE,                    "1",        core_options::option_type::BOOLEAN,                 NULL },
	{ MUIOPTION_SPLITTERS,                    MUIDEFAULT_SPLITTERS, core_options::option_type::STRING,       NULL },
	{ MUIOPTION_LIST_FONT,                    "-13,0,0,0,400,0,0,0,0,1,2,1,34,MS Sans Serif", core_options::option_type::STRING, NULL },
	{ MUIOPTION_COLUMN_WIDTHS,                "170,78,76,84,64,88,48,108,60,144,84,40,40", core_options::option_type::STRING, NULL },
	{ MUIOPTION_COLUMN_ORDER,                 "0,6,2,1,5,9,12,7,8,10,11,3,4", core_options::option_type::STRING, NULL },
	{ MUIOPTION_COLUMN_SHOWN,                 "1,1,1,0,0,1,1,0,0,1,0,0,0", core_options::option_type::STRING,  NULL },
	{ MUIOPTION_CHECK_GAME,                   "0",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_JOYSTICK_IN_INTERFACE,        "1",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_KEYBOARD_IN_INTERFACE,        "0",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_HIDE_MOUSE,                   "0",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_INHERIT_FILTER,               "0",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_OFFSET_CLONES,                "0",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_STRETCH_SCREENSHOT_LARGER,    "0",        core_options::option_type::BOOLEAN,    NULL },
	{ MUIOPTION_CYCLE_SCREENSHOT,             "0",        core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_SCREENSHOT_BORDER_SIZE,       "0",        core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_SCREENSHOT_BORDER_COLOR,      "-1",       core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_EXEC_COMMAND,                 "",         core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_EXEC_WAIT,                    "0",        core_options::option_type::INTEGER,                 NULL },
	{ MUIOPTION_BACKGROUND_DIRECTORY,         "bkground\\bkground.png", core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_DATS_DIRECTORY,               "dats",     core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_VIDEO_DIRECTORY,              "video",     core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_MANUALS_DIRECTORY,            "manuals",     core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_KEY_UP,                    "KEYCODE_UP",                        core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_DOWN,                  "KEYCODE_DOWN",                     core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_LEFT,                  "KEYCODE_LEFT",                     core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_RIGHT,                 "KEYCODE_RIGHT",                    core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_START,                 "KEYCODE_ENTER NOT KEYCODE_LALT",    core_options::option_type::STRING,            NULL },
	{ MUIOPTION_UI_KEY_PGUP,                  "KEYCODE_PGUP",                     core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_PGDWN,                 "KEYCODE_PGDN",                     core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_HOME,                  "KEYCODE_HOME",                     core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_END,                   "KEYCODE_END",                        core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_SS_CHANGE,             "KEYCODE_INSERT",                    core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_HISTORY_UP,            "KEYCODE_DEL",                        core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_HISTORY_DOWN,          "KEYCODE_LALT KEYCODE_0",            core_options::option_type::STRING,          NULL },
	{ MUIOPTION_UI_KEY_CONTEXT_FILTERS,       "KEYCODE_LCONTROL KEYCODE_F", core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_SELECT_RANDOM,         "KEYCODE_LCONTROL KEYCODE_R", core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_GAME_AUDIT,            "KEYCODE_LALT KEYCODE_A",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_GAME_PROPERTIES,       "KEYCODE_LALT KEYCODE_ENTER", core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_HELP_CONTENTS,         "KEYCODE_F1",                 core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_UPDATE_GAMELIST,       "KEYCODE_F5",                 core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_FOLDERS,          "KEYCODE_LALT KEYCODE_D",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_FULLSCREEN,       "KEYCODE_F11",                core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_PAGETAB,          "KEYCODE_LALT KEYCODE_B",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_PICTURE_AREA,     "KEYCODE_LALT KEYCODE_P",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_STATUS,           "KEYCODE_LALT KEYCODE_S",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TOOLBARS,         "KEYCODE_LALT KEYCODE_T",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_CABINET,      "KEYCODE_LALT KEYCODE_3",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_CPANEL,       "KEYCODE_LALT KEYCODE_6",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_FLYER,        "KEYCODE_LALT KEYCODE_2",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_HISTORY,      "KEYCODE_LALT KEYCODE_8",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_MARQUEE,      "KEYCODE_LALT KEYCODE_4",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_SCREENSHOT,   "KEYCODE_LALT KEYCODE_1",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_TITLE,        "KEYCODE_LALT KEYCODE_5",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_VIEW_TAB_PCB,          "KEYCODE_LALT KEYCODE_7",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_KEY_QUIT,                  "KEYCODE_LALT KEYCODE_Q",     core_options::option_type::STRING, NULL },
	{ MUIOPTION_UI_JOY_UP,                    "1,1,1,1",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_DOWN,                  "1,1,1,2",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_LEFT,                  "1,1,2,1",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_RIGHT,                 "1,1,2,2",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_START,                 "1,0,1,0",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_PGUP,                  "2,1,2,1",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_PGDWN,                 "2,1,2,2",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_HOME,                  "0,0,0,0",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_END,                   "0,0,0,0",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_SS_CHANGE,             "2,0,3,0",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_HISTORY_UP,            "2,0,4,0",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_HISTORY_DOWN,          "2,0,1,0",  core_options::option_type::STRING,                 NULL },
	{ MUIOPTION_UI_JOY_EXEC,                  "0,0,0,0",  core_options::option_type::STRING,                 NULL },
	{ "$end" }
};




And i get this errors:

Compiling src/osd/winui/bitmask.cpp...
In file included from D:/mingw/mame/src/osd/winui/winui.h:57,
                 from ../../../../../src/osd/winui/bitmask.cpp:4:
D:/mingw/mame/src/osd/winui/winui_opts.h: In constructor 'winui_ui_options::winui_ui_options()':
D:/mingw/mame/src/osd/winui/winui_opts.h:230:19: error: 'option_entries' was not declared in this scope; did you mean 'options_entry'?
  230 |   for (int i = 0; option_entries[i].name != "$end"; i++)
      |                   ^~~~~~~~~~~~~~
      |                   options_entry
In file included from D:/mingw/mame/src/osd/winui/winui.h:57,
                 from ../../../../../src/osd/winui/bitmask.cpp:4:
D:/mingw/mame/src/osd/winui/winui_opts.h: In member function 'void winui_ui_options::reset_and_save(const char*)':
D:/mingw/mame/src/osd/winui/winui_opts.h:266:19: error: 'option_entries' was not declared in this scope; did you mean 'options_entry'?
  266 |   for (int i = 0; option_entries[i].name != "$end"; i++)
      |                   ^~~~~~~~~~~~~~
      |                   options_entry
osd_winui.make:1684: recipe for target '../../../../mingw-gcc/obj/x32/Release/osd_winui/src/osd/winui/bitmask.o' failed

What do i miss?