lua-users home
lua-l archive

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


Hello,

[snip]
> I find 3 compiler switches about templates, and tried them but.. :-((
> 
> > Another way to deal with this is to explicitly instantiate the member
> > templates. Try adding this line just before "main" (global scope).
> >
> > template int LUA_CLASS(A)::procedure_callback_0<&A::proc>)(lua_State *);
> >
> > and see if the errors on line 31 go away.
> >
> No, this line confuses it(compiler) more:
> [C++ Warning] m.cpp(26): W8054 Style of function definition is now obsolete.
> [C++ Error] m.cpp(26): E2293 ) expected.      --hd-->showing column &A::...
> [C++ Warning] m.cpp(34): W8084 Suggest parentheses to clarify precedence.
> [C++ Error] m.cpp(34): E2188 Expression syntax.
> [C++ Error] m.cpp(35): E2188 Expression syntax.
> [C++ Error] m.cpp(38): E2188 Expression syntax.
> 
> Maybe Borland's compilers are not ready for these type of programs?!

I wish I knew what's going on with the conformance of compilers to the
standard... For example, I've tried VC++ at work, and I got a gpf when I
tried to compile that little file, at the exact same line the borland
compiler starts complaining :)))

> I already installed gcc-2.95.2. If you could post your makefile I will be
> happy.

Well, since it's only just header files, there's no makefile. Try this
(under unix, I don't know about gcc under win32):

g++ -Wall -o m m.cpp -llua -llualib

(assuming you've installed the lua libs)

Nikos