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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:31:37+00:00 2026-05-27T01:31:37+00:00

I am using premake to make new projects using the OpenGL sdk . I

  • 0

I am using premake to make new projects using the OpenGL sdk. I am trying to put together my first real project, but I am having an error when I run premake4 vs2010 command. I am trying to use the UseLibs function to gain access the the OpenGL sdk elements, however premake is throwing an error which says:

“attempt to call global ‘UseLibs’ (a nil value)

Heres the lua code:

solution "OpenGL"
    configurations {"windows", "linux", "Debug", "Release"}
    project "MyProject"
        kind "ConsoleApp"
    language "c++"
files {"First OpenGL v3\*.cpp", "First OpenGL v3\*.h"}

UseLibs {"glimage", "glload", "freeglut", "glutil", "glmesh", "glfw", "glm"}

configuration "windows"
    defines "WIN32"
    links {"glu32", "opengl32", "gdi32", "winmm", "user32"}

configuration "linux"
    links {"GL"}

configuration "Debug"
    targetsuffix "D"
    defines "_DEBUG"
    flags "Symbols"

configuration "Release"
    defines "NDEBUG"
    flags {"OptimizeSpeed", "NoFramePointer", "ExtraWarnings", "NoEditAndContinue"};

Much of the code here is based on what it says to do on the tutorial so I am not sure why I am getting this error. I am fairly new at this, so if you see any other issues please tell me. Thanks.

  • 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-27T01:31:38+00:00Added an answer on May 27, 2026 at 1:31 am

    Allow me to quote from what you linked to:

    Regardless of whether the main premake4.lua file does all the work, the first thing you should do is execute this instruction:

    dofile("path/to/GLSDK/links.lua")
    

    I don’t see that line in your Premake4 build script.

    Also, there’s no need to include both FreeGLUT and GLFW. You cannot possibly use them both in the same application, since they both do the same thing. They create OpenGL windows. I mean, I guess you could possibly use them both, but it seems unlikely to work.

    Your program uses one or the other. Whichever one it uses is the one you should put in the UseLibs command.

    Also:

    configurations {"windows", "linux", "Debug", "Release"}
    

    windows and linux are not normal, user-specified, configurations. They’re OS configurations. You don’t list them in the solution configuration’s list; they’re part of the system. Listing them here may cause problems.

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

Sidebar

Related Questions

Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using JDeveloper , I started developing a set of web pages for a project
I recently began setting up my own library and projects using a cross platform
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
I am currently trying to learn how to use premake 4 in order to
I'm trying to start building a whole application using phpBB3 user system as a
Using Git Bash or MinGW Shell , if I put in a command with

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.