Sign in to follow this  
AlanMMW

compilling Lua with C++ ???

Recommended Posts

HI! i am with a problem! how to compilling lua with c++ on linux??? it is? : g++ demo.cpp -o demo -llua -lliblua -lm help-me

Share this post


Link to post
Share on other sites
If you're compiling in C++ instead of C, you need to do extern "C" around the includes.

extern "C" {
#include "lua.h"
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this