Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6889135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:07:03+00:00 2026-05-27T06:07:03+00:00

I have an errors during compilation of OpenGL SFML C++ project in Eclipse (using

  • 0

I have an errors during compilation of OpenGL SFML C++ project in Eclipse (using MinGW as toolchain):

undefined reference to `gluNewQuadric@0′

undefined reference to `gluQuadricDrawStyle@8′

undefined reference to `gluDeleteQuadric@4

The offending code is here:

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>   
 
sf::WindowSettings Settings;
Settings.AntialiasingLevel = 2;
Settings.DepthBits = 24;
Settings.StencilBits = 8;
sf::Window  App(sf::VideoMode(1024, 768, 32), "SFML Window", sf::Style::Close, Settings);
App.SetFramerateLimit(30);
prepareGL(App.GetWidth(), App.GetHeight());
sf::Clock Clock;
App.SetActive();
// GL goes here:
GLUquadricObj *qw1 = gluNewQuadric();
gluQuadricDrawStyle(qw1,GLU_POINT);
App.Display();
while (App.IsOpened()) {
    sf::Event Event;
    while (App.GetEvent(Event)) {
        if (((Event.Type == sf::Event::KeyPressed)
            && (Event.Key.Code == sf::Key::Escape))
            || (Event.Type == sf::Event::Closed)) {
            gluDeleteQuadric(qw1);
            App.Close();
        }
        if (Event.Type == sf::Event::Resized) {
            glViewport(0, 0, Event.Size.Width, Event.Size.Height);
        }
    }
}
return EXIT_SUCCESS;

What I did wrong? Usually, I code in Java, and this project I am doing for learning more about C/C++. I did other OpenGL programs before, and I had no problems like that before.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:07:04+00:00Added an answer on May 27, 2026 at 6:07 am

    You need to pass appropriate flag to the compiler. To include the GLU library, pass this to the compiling and linking options :

    -lGLU
    

    EDIT : The above works on linux, but for windows, it is :

    -lglu32
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My project requires Java 1.6 for compilation and running. Now I have a requirement
I'm using RHEL5 kernel 2.6.33 and running GCC v4.1.2. During my program compilation, I
I have some Ant tasks in my Eclipse JDT project that I want to
I have a big .net mvc 2 project where we are using MvcContrib Portable
I have an error during compiling: raja@raja-desktop:~/socket$ g++ Socket.cpp Socket.cpp: In member function ‘int
What happens in mysql multiple records insert during an error. I have a table:
during beta testing we discovered connection pooling error messages . Therefore I have been
I have inherited a poorly written web application that seems to have errors when
I have custom errors configured in my web.config, but IIS 6.0 is returning the
I have 2 errors in XCode and am trying to figure out what they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.