I am trying to compile hosts3d from sourceforge and it does compile but generates several narrowing errors. I don't have any idea how to fix this but any help would be greatly appreciated. I suspect I could download the previous version of the compiler and i might end up doing that but for now... c++11
g++ -Wall -O2 -c -o src/glwin.o src/glwin.cpp src/glwin.cpp: In member function 'int MyGLWin::AddInput(int, int, unsigned int, int, const char*, bool)': src/glwin.cpp:983:147: warning: narrowing conversion of 'max' from 'int' to 'unsigned int' inside { } is ill-formed in C++11 [-Wnarrowing] glin_obj glin = {GLWIN_INPUT, lastWin, lower, names++, left, top, cwidth, strlen(text), (strlen(text) > cwidth ? strlen(text) - cwidth : 0), max};
//create input object, return name of input object
int MyGLWin::AddInput(int left, int top, unsigned int cwidth, int max, const char *text, bool lower)
{
if (!lastWin) return -1; //check parent window object exists
glin_obj glin = {GLWIN_INPUT, lastWin, lower, names++, left, top, cwidth, strlen(text), (strlen(text) > cwidth ? strlen(text) - cwidth : 0), max};
strcpy(glin.text, text); //default text
currInput = glin.name; //set input object focus (for keys)
lastInput = (glin_obj *)GLWinLL.Write(new glin_obj(glin));
return glin.name;
}