How to fix the undefined reference error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to fix the undefined reference error?

When I compile https://code.sololearn.com/cvyy5StIOJ0n/#cpp, it complains: ..\Playground\~1\AppData\Local\Temp\ccMc1WGk.o:source.cpp:(.text+0x76): undefined reference to `GetStockObject@4' ..\Playground\~1\AppData\Local\Temp\ccMc1WGk.o:source.cpp:(.text+0x1b3): undefined reference to `glClearColor@16'

26th May 2017, 1:33 PM
sinojelly
1 Answer
+ 11
Your code probably doesn't work on Code Playground. There are some OS dependant stuff which isn't supported by the online compiler.
26th May 2017, 2:04 PM
Hatsy Rei
Hatsy Rei - avatar