Build error

I am trying to build the current github build and am getting this error

CXX src/Menu/openxcom-SlideshowState.o
src/Menu/SlideshowState.cpp: In member function ‘void OpenXcom::SlideshowState::screenClick(OpenXcom::Action*)’:
src/Menu/SlideshowState.cpp:115:45: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (_curScreen < _slideshowSlides->size())

Here is the github repo

I do not know how to fix this
plz help!

well, you could add (unsigned) to the line in question so it becomes:

if (_curScreen < (unsigned)_slideshowSlides->size())

instead. It's a bit hackish, and probably what you really want to do is change the line

int _curScreen;

in the SlideshowState.h file to

unsigned int _curScreen;

but I don't know the application, and I haven't read read the through all the source, so I can't be sure what it is actually supposed to do, and whether the current screen may contain a negative number at any point or not.

I believe this is the section of code that is the issue
It does not have a int _curScreen;
however it does have a if _curScreen;
Do I add the unsigned to that or the bold line
plz advise I'm not a programmer so keep it simple
in the github the file is in /src/menu/SlideshowState.cpp

I tried putting the unsigned at both places individually and neither worked

your bolded line is where you would add (unsigned). If you were to go the other route, int _curScreen is in a different file (ending in ".h" not in ".cpp")

btw, either of the edits will guarantee you an error free build. There may be tons of errors. This edit only fixes that one error.

(don't edit the if (_curScreen >= 0) line)

It appears to have an issue with the ()
if (curScreen < (unsigned)slideshowSlides->size())
kept the other line unchanged

There oughtn't be a problem, but try this

if (_curScreen < (unsigned)(_slideshowSlides->size()))

(otherwise I'm going to need to see more of the error)

Alternatively you can set it back, and I'm assuming make to build it (?), you can try

$ make CXXFLAGS=-w

instead of just

$ make

src/Menu/SlideshowState.cpp:115:5: error: ‘curScreen’ was not declared in this scope
if (curScreen < (unsigned)(_slideshowSlides->size()))
-_ ^-------------------------------^

you accidentally removed the underscore.. it's _curScreen (EDIT: and so did I. fixed)

yeah found that it was missing from slideshowslides-> as well

yeah. just spotted that too. :)

is it building?

It built succesfully now I'm having what I believe to be an unrelated error
thank you for your help
It's a yaml-cpp error
package issue I think

great it got this far :) glad to help.

yaml is markup language often used for config files. If it did otherwise install correctly, maybe there is a config file missing?