I have an old program that uses legacy opengl. I am attempting to run the code, but I have been stumbling into some errors. I installed freeglut
and attempted to link it and add the includes, and while it seems to execute, I get an error in the process that states:
undefined reference to `_imp___glutInitWinExit@12
The bit of code in the freeglut_std.h
header file that is causing the error is located at:
static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv_ { _glutInitWithExit(argcp, argv, exit); }
This is line 637 of the code, so I presume I linked freeglut properly, but for some reason is stopping just short of execution. I am not sure what steps I should take from here, and any help is appreciated. Thank you.
Edit: Build log (a snippet of it) -
C:/Program Files (x86)/CodeBlocks/MinGW/include/GL/freeglut_std.h:637: undefined reference to `_imp____glutInitWithExit@12'
obj\Debug\curve.o: In function `glutCreateWindow_ATEXIT_HACK':
C:/Program Files (x86)/CodeBlocks/MinGW/include/GL/freeglut_std.h:639: undefined reference to `_imp____glutCreateWindowWithExit@8'
obj\Debug\curve.o: In function `glutCreateMenu_ATEXIT_HACK':
C:/Program Files (x86)/CodeBlocks/MinGW/include/GL/freeglut_std.h:641: undefined reference to `_imp____glutCreateMenuWithExit@8'
obj\Debug\curve.o: In function `curve_buildLine':