lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I think preprocessor # directive are only allowed at the beginning of a line isn't it ?

Luiz Henrique de Figueiredo wrote:

------  CODE SNIPPET  -----
#include <stdio.h>
extern "C" { #include <lua.h> }

gcc lua.c -o xlua -llua -llualib

-----  ERROR SNIPPET  -----
lua.c:2: parse error before string constant
lua.c:2: syntax error at '#' token

gcc is a C compiler, not C++. Try g++ instead.
--lhf