[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: questions about lua 5 FINAL
- From: "Ashish Ranjan <ashishwave@...>" <ashishwave@...>
- Date: Tue, 04 Mar 2003 13:23:35 -0000
Hi Roberto and all,
In redhat 8, gcc and g++ version 3.2 are included. When we compile
lua5beta with gcc it compiles easily . But when we compile it with
g++, it gives many errors as following:
In file included from lvm.c:32:
/usr/include/stdio.h:473:54: macro "getline" passed 3 arguments, but
takes just 2
In file included from lvm.c:32:
/usr/include/stdio.h:473: syntax error before `throw'
In file included from /usr/include/stdio.h:676,
from lvm.c:32:
/usr/include/bits/stdio.h:102:55: macro "getline" passed 3 arguments,
but takes just 2
In file included from /usr/include/stdio.h:676,
from lvm.c:32:
/usr/include/bits/stdio.h:102: syntax error before `throw'
In file included from lvm.c:32:
/usr/include/stdio.h:679: parse error before `}' token
make[1]: *** [lvm.o] Error 1
make[1]: Leaving directory `/home/admin/a/lua-5.0-beta/src'
make: *** [all] Error 2
===========
also, if in Slackware 8 linux, we compile it(lua5beta) with gcc , it
compiles succesfully. but when compiling with g++ it gives errors, as
following:
luac.c: In function `struct Proto * combine(lua_State *, int)':
luac.c:115: warning: ANSI C++ forbids implicit conversion from `void
*' in initialization
luac.c:130: warning: ANSI C++ forbids implicit conversion from `void
*' in initialization
../../lib/liblualib.a(liolib.o): In function `io_tmpname(lua_State *)':
liolib.o(.text+0x106b): the use of `tmpnam' is dangerous, better use
`mkstemp'
Note that slackware linux 8 includes gcc and g++ version 2.95.3
i hope that you will make it compile with g++ also without headaches
, as was possible in previous versions of lua.
Also i will suggest that, IF YOU CAN NOT SUPPORT C++ COMPILATION
GUARANTEED SUPPORT THEN ATLEAST PUT extern "C" linkage , so that peole
using c++ compilers do not have to do it specially.. you put
following in the standard distribution lua.h etc. include files should
contain the following code
#ifdef __cplusplus
extern "C" {
#endif
.................
......................
#ifdef __cplusplus
}
#endif
I know that u may say that one can remove these compilation errors
with g++, but if we can achieve g++ 3 version compatibility in
standard distribution with few efforts then that wont be a wasted effort.
bye :-)
Ashish
--- In lua-l@yahoogroups.com, Roberto Ierusalimschy <roberto@i...> wrote:
> > i want to ask what is your expected schedule to release Lua-5.0 final.
>
> March.
>
>
> > SECONDLY, gcc compiles lua , but previous versions of lua also got
> > compiled effortlesslly BY g++. But lua 5.0-beta gives headaches when
> > using g++ instead of gcc.
>
> Can you give more details? Our goal has been to allow Lua to compile as
> C++ code without warnings.
>
> -- Roberto