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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:36:21+00:00 2026-05-20T15:36:21+00:00

I have simple console application project for live video streaming using cross-platform libs on

  • 0

I have simple console application project for live video streaming using cross-platform libs on to some TCP server. I have it ported manually to Linux and Mac OS X from Windows. So now I have 3 projects using same code each of them created manually and tested. Now I am trying to create a premake lua projects creation file to automate process of updating project files.

I started creating a lua file

I have an array of lib links in my premake lua build file I have an array of lib links required for my project.

Some of them kind of repeat some of them do not (because for example there is “openal32” on Windows (even on Windows 7 64 bit version) and much simpler name “openal” on Linux and “OpenAL.framework” on Mac OS X (and its the only option on mac os to include openAL)

I have a linkdirs property set – one for all systems

libdirs {
"/opt/local/lib",
"/System/Libarary/Frameworks",
"/Library/Frameworks",
"/usr/lib",
"/usr/local/lib" }

That links to dirs will probably work for Mac OS X (because we use Mac Ports that installs by default into /opt/local/lib) and Linux (where we mostly use app-get analogs that auto install all into usr/lib, and sometimes into /usr/local/lib). But on windows you never know where ffmpeg is or where is boost installed (probably each programmer has his own idea where to keep windows Libs and Headers…) so we need a simple thing from premake:

Action to add a user defined librarys directorys that will be included into libdirs array and same thing for includedirs array. It shall ba capable to add more than one directory.

How to enable such thing?

I tried to create an “option based system” like

newoption {
trigger = "libsPath",
value = "PATH",
description = "Choose a particular directory for general libs search"
}
if not _OPTIONS["libsPath"] then
_OPTIONS["libsPath"] = NULL
end

libdirs {
"/opt/local/lib",
"/System/Libarary/Frameworks",
"/Library/Frameworks",
"/usr/lib",
"/usr/local/lib",
_OPTIONS["libsPath"]
}

but it seems not to work on windows… what shall I do?

  • 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-20T15:36:21+00:00Added an answer on May 20, 2026 at 3:36 pm

    You don’t need this bit:

    if not _OPTIONS["libsPath"] then
       _OPTIONS["libsPath"] = NULL
    end
    

    It will already be nil (the equivalent of NULL in Lua) if it is unset. Otherwise, this looks good and works fine for me.

    One possible improvement you might make: converting the argument to accept a delimited list of paths, so your users can provide more than one if necessary. So if you called your script like this, with semicolon separated paths:

    C:\> premake4 /libsPath=C:\Code\Libs;C:\Code\MoreLibs vs2010
    

    You would add it to you library search paths like this:

    -- Split it up
    libdirs { string.explode(_OPTIONS["libsPath"], ";") }
    

    Untested, but should work. Hope that helps!

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

Sidebar

Related Questions

What am I doing wrong? I have a simple console app in VS08. When
I have a URI here in which a simple document.cookie query through the console
Ok, i have simple scenario: have two pages: login and welcome pages. im using
I have simple regex \.*\ for me its says select everything between and ,
In general, is it a best practice to have simple POJO Java classes implement
I develop tools in Autodesk Maya. Many of the tools I build have simple
Should simple JavaBeans that have only simple getters and setters be unit tested?? What
I have a simple webform that will allow unauthenticated users to input their information,
I have a simple 2-column layout with a footer that clears both the right
I have a simple page with my ScriptManager and my UpdatePanel , and my

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.