Hello. My first post here. I am using OS X 10.5.6. I am trying to compile a simple C program in Terminal using g++.
//File: a.c
#include <stdio.h>
extern "C"
{
#include <lua.h>
}
int main(int argc, char* argv[ ])
{
lua_State* luaVM = lua_open(0);
if (NULL == luaVM)
{
printf("Error Initializing lua\n");
return -1;
}
return 0;
}
I type the line "g++ a.c"
Compiler errors abound because g++ cannot find lua.h, which resides in /opt/local/include. My PATH is set to the following:
/opt/local/bin:/opt/local/include:/stow/bin:/stow/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
lua.h is in the second entry of PATH, but g++ cannot find it. If anyone can shed some light on this, I would be much appreciative.
-Kris
//File: a.c
#include <stdio.h>
extern "C"
{
#include <lua.h>
}
int main(int argc, char* argv[ ])
{
lua_State* luaVM = lua_open(0);
if (NULL == luaVM)
{
printf("Error Initializing lua\n");
return -1;
}
return 0;
}
I type the line "g++ a.c"
Compiler errors abound because g++ cannot find lua.h, which resides in /opt/local/include. My PATH is set to the following:
/opt/local/bin:/opt/local/include:/stow/bin:/stow/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
lua.h is in the second entry of PATH, but g++ cannot find it. If anyone can shed some light on this, I would be much appreciative.
-Kris
Last edited: