Program ok in XP, but gives library error in XUbuntu?

Try changing "static" to "const" in the line that gets the error.