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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:11:18+00:00 2026-06-16T16:11:18+00:00

This is driving me mad, I want to statically link to GLFW.lib, following section

  • 0

This is driving me mad, I want to statically link to GLFW.lib, following section 4.2.1. of the readme.html file provided I have added glfw.lib and opengl32.lib to the additional dependancies section of the linker on VS.

I’ve also added the dir including glfw.lib to the additional library directories section under linker > general.

And of course I have included the glfw.h file in my project, yet I’m still getting…

Error   1   error LNK2019: unresolved external symbol _glfwInit referenced in function _main    C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Spark\main.obj   Spark
Error   2   error LNK2019: unresolved external symbol _glfwTerminate referenced in function _main   C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Spark\main.obj   Spark
Error   3   error LNK2019: unresolved external symbol _glfwOpenWindow referenced in function _main  C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Spark\main.obj   Spark
Error   4   error LNK2019: unresolved external symbol _glfwSwapBuffers referenced in function _main C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Spark\main.obj   Spark
Error   5   error LNK2019: unresolved external symbol _glfwGetWindowParam referenced in function _main  C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Spark\main.obj   Spark
Error   6   error LNK2019: unresolved external symbol _glfwGetKey referenced in function _main  C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Spark\main.obj   Spark
Error   7   error LNK1120: 6 unresolved externals   C:\Users\Smith_000\Documents\Visual Studio 2012\Projects\Spark\Debug\Spark.exe  1   1   Spark

With the following (example) code…

#include <glfw.h>
#include <stdlib.h>

int main( void )
{
    int running = GL_TRUE;

    // Initialize GLFW
    if( !glfwInit() )
    {
        exit( EXIT_FAILURE );
    }

    // Open an OpenGL window
    if( !glfwOpenWindow( 300,300, 0,0,0,0,0,0, GLFW_WINDOW ) )
    {
        glfwTerminate();
        exit( EXIT_FAILURE );
    }

    // Main loop
    while( running )
    {
        // OpenGL rendering goes here...
        glClear( GL_COLOR_BUFFER_BIT );
        // Swap front and back rendering buffers
        glfwSwapBuffers();
        // Check if ESC key was pressed or window was closed
        running = !glfwGetKey( GLFW_KEY_ESC ) &&
        glfwGetWindowParam( GLFW_OPENED );
    }

    // Close window and terminate GLFW
    glfwTerminate();

    // Exit program
    exit( EXIT_SUCCESS );
}

What am I doing wrong?

  • 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-06-16T16:11:19+00:00Added an answer on June 16, 2026 at 4:11 pm

    Make sure you have glfw.dll in folder with your .exe file. If this wont help, add another library glu32.lib.

    I use to add libraries in code by adding this before main function. With this you see wich libraries you have linek without diging through options and menus.

    #pragma comment(lib, "GLFW.lib")
    #pragma comment(lib, "opengl32.lib")
    #pragma comment(lib, "glu32.lib")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is driving me mad so please help if you can... I have a
hoping you can help... This is driving me MAD!!! I have 2 select boxes
this is driving me MAD now.. I have a UItableview. Based on an NSMutableArray,
This is driving me mad , I have a code that works perfect with
omg this is driving me mad. I have one table-row containing two table-cells. if
See update below. This is driving me mad. I have followed all the instructions
This has been driving me mad. I have three tables: items ID name type
This is driving me mad, I have a facebook like button on my site
This one is driving me mad for the last 3 hours. I want to
This issue is driving me mad. I have several tables defined, and CRUD stored

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.