草庐IT

c++ - MinGW 和 GLUT 未定义对 '_imp____glutInitWithExit@12' 的引用

我接触了一年的Python,正在学习c++,所以我是一个菜鸟。我安装了MinGW并且一切正常,直到我安装了freeglut。当我运行以下代码时:#includeintmain(){return0;}使用:C:\code\cpp>g++GLtest1.cpp我明白了:C:\Users\User\AppData\Local\Temp\ccABWOyv.o:GLtest1.cpp:(.text+0x1c):undefinedreferenceto`_imp____glutInitWithExit@12'C:\Users\User\AppData\Local\Temp\ccABWOyv.o:G