Please use [code=cpp]...[/code] tags.
As mentioned in the thread that I linked, some information about the problem you are actually having is necessary. "I get a setting vertical sync failed error" is not very much information. Which vertical sync error? What happened? Did it post the error to the console but still work? Did it crash? What did the crash report say?
Does the code work in the original environment (Windows 10) or does the error occur in both environments (Windows and Ubuntu)?
It is not actually an error, it just displays red in the console... should I just not worry about it? I used the word error erroneously =), I think it may just be a warning?
Anyway, the code is fine in windows. However, I do not believe that is relevant(different paths, architectures, etc.)