A new version is available!

Premake 4.0 is now available at our new website.

This page describes Premake 3.7, the last release in the 3.x series.

Frequently Asked Questions

Q. Is it possible to invoke external tools?

Yes, using Lua's os.execute() function. See the Lua Reference Manual for details.

Q. Why is my Windows program trying to call main() instead of WinMain()?

Premake tries hard to make all build tools on all platforms perform as similarly as possible. So, by default, it will configure your Windows applications to call the standard main() entry point instead of the Windows-specific WinMain(). You can change this behavior by adding the no-main build flag to your package, like so:

package.buildflags = { "no-main" }

Q. How do I build a universal binary on MacOSX?

$ make clean
$ make CONFIG=Release TARGET_ARCH="-arch i386 -arch ppc"

Replace “Release” with the appropriate configuration name. Note that in order to target multiple architectures, GCC’s automatic dependency generation must be turned off. So you should always make clean before and after building your universal binary. This feature requires Premake 3.6 or later.

Q. Why doesn’t Premake have feature X?

I’m a big fan of feature driven development, which is to say that I don’t add anything that I don’t have an immediate need for. If you need something added to Premake, you can mention it on the mailing list or even better create a feature request. Or code it up yourself — Premake is a pretty simple program, relatively, and it’s open source.