Author Topic: Cannot Compile  (Read 7355 times)


  • Guest
Cannot Compile
« on: February 22, 2005, 01:27:19 pm »
I have been trying for days to compile this code and I always get some sort of undefiened reference error and cannot compile as a result. I would like someone to compile the follwing code and send me the project if it compiles.

//#include <OpenGLSB.h>
//#include <windows.h>
#include <gl/gl.h>
#include <glut.h>

void RenderScene();
void SetupRC();
void RenderScene(void)
    glClear (GL_COLOR_BUFFER_BIT);
void SetupRC(void)
    glClearColor (0.0f, 0.0f, 0.0f, 0.0f);

int main(void)
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);

return 0;

This project uses the gl,glu,glut libraries I am don't thing you need windows.h all this code does is bring up a window from the console.
Here is a link to the glut libraries (don't want to slow down this server)

Renderscene is called by glut main loop. Notice I passed that to one of the glut functions.


  • Guest
Cannot Compile
« Reply #1 on: February 24, 2005, 01:11:55 am »
I have found the solution, I was the problem!!!

Thank you very much for your help I think that the problem was in the arguments that I passed to the linker. I remade the project and only included the libraries that  I needed and no other and everything went smooth.

These are the libraries I included:
glut32, opengl32
These are the arguments sent to the linker
-lglut32 -lopengl32
Now all the arguments in caps so there is no confusion as to what I passed use the small ones if you plan to use them.
and that is a dash

I had to clarify for other noobs that may come and read this post!!!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Cannot Compile
« Reply #2 on: February 24, 2005, 09:13:28 am »
I 'm glad you solved your problem and posted the solution.
In the future, when you 're asking for help on compilation issues, it 'll be better to post the full build log. This way, people wanting to help you, can spot the problem easier...

To enable full build logging, go to "Settings/Configure plugins/Compiler", switch to the "Other" tab and select full logging.

Be patient!
This bug will be fixed soon...