Hello,
Thank you for your reply. I had another look at the Build log and saw that one error suggested to use gnu++11. As I set the -std=c++11 flag already and thought they were equivalent I assumed that the problem was in the missing -lmgl flag. I just found out, that c++11 and gnu++11 are in fact not the same, and the problem got resolved with the gnu++11 flag (instead of c++11). Now the second line in the build log includes the -lmgl flag and everything is compiling and linking flawlessly.
As a side note, I can't add mathgl to the library list because it's not a compiled library but consists only of header files. Giving the compiler the search path works.
Thank you,
backes