我正在尝试使用freeglut在Code :: Blocks中构建项目。
#include <gl/glut.h>
int main(int argc, char ** argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(400, 400);
glutInitWindowPosition(100, 200);
glutCreateWindow("Our first GLUT application!");
return 0;
}
然后得到这个错误:
||=== Build: Debug in FreeGlut (compiler: GNU GCC Compiler) ===|
:\mingw\bin\..\lib\gcc\mingw32\4.8.1\..\..\..\..\mingw32\lib\crt2.o||In function `_mingw_setargv':|
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld\..\mingwrt-4.0.3-1-mingw32-src\src\libcrt\crt\init.c|241|undefined reference to `__mingw_glob'|
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld\..\mingwrt-4.0.3-1-mingw32-src\src\libcrt\crt\init.c|214|undefined reference to `__mingw_glob'|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|