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 6234425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:29:01+00:00 2026-05-24T10:29:01+00:00

Using Eclipse 3.6.2, current version of CDT, current Cygwin tools and C++ (GCC) compiler.

  • 0

Using Eclipse 3.6.2, current version of CDT, current Cygwin tools and C++ (GCC) compiler. Linking -lglu32, -lglut32, -lopengl32.

I’m trying to get this environment set-up for OpenGL development and am running into linking errors that I’ve been unable to resolve. Current versions of the relevant opengl and glut libs and headers have been copied to C:\cygwin\lib and C:\cygwin\usr\include\w32api

For example while this compiles and links ..

#include <windows.h>

#include <GLES2/gl2.h>

#include <EGL/egl.h>

#include <GL/glut.h>

[...]

void display() {

    glClear( GL_COLOR_BUFFER_BIT ); /* Clear the screen with the clear color */

glBegin(GL_TRIANGLES);
    glVertex3f(-0.5,-0.5,0.0);
    glVertex3f(0.5,0.0,0.0);
    glVertex3f(0.0,0.5,0.0);
glEnd();

glutSwapBuffers(); 

}

the following throws undefined reference errors on glVertextAttribPointer, glEnableVertexAttribArray and glDisableVertexAttribArray.

void display() {

glClear( GL_COLOR_BUFFER_BIT ); /* Clear the screen with the clear color */

    // map the border vertices
glVertexAttribPointer(crosshairVertexHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &crossVertices[0]);
glEnableVertexAttribArray(crosshairVertexHandle);


glLineWidth(2.0f);
glDrawArrays(GL_LINES, 0, 4);
glDisableVertexAttribArray(crosshairVertexHandle);

glutSwapBuffers(); /* Double buffering */

}

Here’s the error..

Build of configuration Debug for project ogl_tests **

make all 
Building file: ../src/ogl_tests.cpp
Invoking: Cygwin C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/ogl_tests.d" -MT"src/ogl_tests.d" -o"src/ogl_tests.o" "../src/ogl_tests.cpp"

Finished building: ../src/ogl_tests.cpp

Building target: ogl_tests.exe
Invoking: Cygwin C++ Linker
g++  -o"ogl_tests.exe"  ./src/ogl_tests.o   -lglu32 -lglut32 -lopengl32
./src/ogl_tests.o: In function `_Z7displayv':
/cygdrive/c/Users/David/workspace/ogl_tests/Debug/../src/ogl_tests.cpp:61: undefined reference to `__imp__glVertexAttribPointer@24'
/cygdrive/c/Users/David/workspace/ogl_tests/Debug/../src/ogl_tests.cpp:62: undefined reference to `__imp__glEnableVertexAttribArray@4'
/cygdrive/c/Users/David/workspace/ogl_tests/Debug/../src/ogl_tests.cpp:67: undefined reference to `__imp__glDisableVertexAttribArray@4'
collect2: ld returned 1 exit status
make: *** [ogl_tests.exe] Error 1

Any ideas?? – are the cygwin paths that I’m using correct?

  • 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-24T10:29:03+00:00Added an answer on May 24, 2026 at 10:29 am

    @Nicol Bolas gave you one pice of the puzzle I give you the other: You’re using OpenGL functions that go beyond the functionality of OpenGL-1.1, yet even OpenGL-1.4. On Windows OpenGL functionality beyond that versions must be obtained through the extension mechanism.

    The most easy way to do this is using a extension wrapper like GLEW or GLEE. GLEW must be initialized with glewInit() right after context creation. GLEE can be used without initialization (that happens implicitly upon first call of an extension function).

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

Sidebar

Related Questions

When using Eclipse or NetBeans IDE on a Java project I get to see
Im using Eclipse 3.4, EclipseMe 1.7.9. Im trying to deploy/create package a simple project
I've recently started using Eclipse Ganymede CDT for C development and I couldn't like
I am using the current version of SpringSource Tool Suite with the Groovy/Grails plugin
What's the current status of using the latest version of the Android ADT with
I'm using Eclipse Ganymede (version 3.4.1) with a C++ project. Is there some way
We are using Eclipse (Galileo) to create some custom BIRT reports (version 2.5) for
I'm trying to use the Scala Eclipse plug-in (version 1.1.0, which appears to be
I'm trying to put my current project on version control. With java, I've been
Using Eclipse I want to view the source code for a core Java class

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.