Hello everyone, This is my first post to the forums. I am enrolled in a class that requires me to use Qt (so I am also new to Qt). I am running on a Windows 7 machine with Qt 5.3. We also have downloaded the latest version of CMake (3.0.1) as a builder. I have linked the builder in Qt options (CMake.exe). I believe I am having issues with my GLUT files/paths. When I build/run the .cpp file I recieve the following errors:

[img=http://s29.postimg.org/4wgoykq0z/qt_errors.jpg]

I am using the CMakeLists.txt file when opening a project to build. Here is the CMakeLists.txt file:
Qt Code:
  1. # Main cmake file
  2.  
  3. cmake_minimum_required(VERSION 2.6)
  4.  
  5. # Main project name is ARMaker
  6. project(HelloOpenGL)
  7.  
  8. # Find packages
  9. FIND_PACKAGE(OpenGL)
  10. FIND_PACKAGE(GLUT)
  11.  
  12. # Include dirs
  13. include_directories(${OPENGL_INCLUDE_DIR})
  14. include_directories(${GLUT_INCLUDE_DIR})
  15.  
  16.  
  17. # Add all files to the configuration
  18. file(GLOB HelloOpenGL_SRC
  19. "*.h"
  20. "*.cpp"
  21. )
  22.  
  23. # Create an executable
  24. add_executable(HelloOpenGL ${HelloOpenGL_SRC})
  25.  
  26.  
  27. # Add libraries
  28. target_link_libraries(HelloOpenGL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
To copy to clipboard, switch view to plain text mode 

Here is the .cpp file:
Qt Code:
  1. #include <iostream>
  2.  
  3. #if defined(__APPLE__) || defined(MACOSX)
  4. #include <GLUT/glut.h>
  5. #include <OpenGL/gl.h>
  6. #include <OpenGL/glu.h>
  7. #else
  8. #include <windows.h>
  9. #include <gl/gl.h>
  10. #include <gl/glu.h>
  11. #include <gl/glut.h>
  12.  
  13. #endif
  14.  
  15.  
  16.  
  17. using namespace std;
  18.  
  19. void display(void)
  20. {
  21. /* clear all pixels */
  22. glClear (GL_COLOR_BUFFER_BIT);
  23.  
  24. /* draw white polygon (rectangle) with corners at
  25.  * (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0)
  26.  */
  27. glColor3f (1.0, 1.0, 1.0);
  28. glBegin(GL_POLYGON);
  29. glVertex3f (0.25, 0.25, 0.0);
  30. glVertex3f (0.75, 0.25, 0.0);
  31. glVertex3f (0.75, 0.75, 0.0);
  32. glVertex3f (0.25, 0.75, 0.0);
  33. glEnd();
  34.  
  35. /* don't wait!
  36.  * start processing buffered OpenGL routines
  37.  */
  38. glFlush ();
  39. }
  40.  
  41. void init (void)
  42. {
  43. /* select clearing (background) color */
  44. glClearColor (0.0, 0.0, 0.0, 0.0);
  45.  
  46. /* initialize viewing values */
  47. glMatrixMode(GL_PROJECTION);
  48. glLoadIdentity();
  49. glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
  50. }
  51.  
  52. /*
  53.  * Declare initial window size, position, and display mode
  54.  * (single buffer and RGBA). Open window with "hello"
  55.  * in its title bar. Call initialization routines.
  56.  * Register callback function to display graphics.
  57.  * Enter main loop and process events.
  58.  */
  59. int main(int argc, char** argv)
  60. {
  61. glutInit(&argc, argv);
  62. glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
  63. glutInitWindowSize (250, 250);
  64. glutInitWindowPosition (100, 100);
  65. glutCreateWindow ("hello");
  66. init ();
  67. glutDisplayFunc(display);
  68. glutMainLoop();
  69. return 0; /* ISO C requires main to return int. */
  70. }
To copy to clipboard, switch view to plain text mode 

My professor claims it is due to the linkage between Qt and the GLUT files. I have a hunch it cannot process the GLUT.lib file. Has anyone seen this issue or can help me so I can properly build and run my code? All of my course content will be of this format so once I figure this out I will be set.

Thanks,
Steven