Reputation: 11
I'm trying to run this .cpp file in Codeblocks (only change is adding #include for windows.h to beginning).
It uses OpenGL, GLUT, and GLUI. I think I've gotten OpenGL and GLUT to work in Codeblocks but GLUI is still giving me some issues. At first, I downloaded GLUI from here and copied glui.h into C:\Program Files (x86)\CodeBlocks\MinGW\include\GL
.
I was getting an error around line 455:
void control_cb( int control ){
if (control == 5){
GLUI_Master.close_all();
(...)
};
which stated there was an undefined reference to GLUI_Master.
I then realized that the GitHub repository also had a GLUI header file so I deleted the other header file and copied this new one into the same place as above.
I was able to get a little further now, getting an error around line 508:
void createSettingsMenu(){
(...)
new GLUI_Button( settings, "Update", 5,control_cb);
//settings->set_main_gfx_window(mainWindow);
(...)
};
which stated there was no matching function for call to:
GLUI_Button::GLUI_Button(GLUI*&, const char [7], int, void(&) (int)).
I'm not sure what this means, but it also says
**note: candidate: GLUI_Button::GLUI_Button()
note: candidate expects 0 arguments, 4 provided**
around line 847:
GLUI_Button( void ) {
sprintf( name, "Button: %p", this );
type = GLUI_CONTROL_BUTTON;
h = GLUI_BUTTON_SIZE;
w = 100;
alignment = GLUI_ALIGN_CENTER;
can_activate = true;
};
I'm assuming this is related to the error but I'm not sure how to fix this -- I thought this error was surely caused by an issue in setting up GLUI with Codeblocks.
Upvotes: 1
Views: 545