lua-users home
lua-l archive

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


Hello, everyone!

I've recently found Lua. It's nice, clean, simple, superb etc :)

But  when  I  try  to  compile the source in VC7 I get the folowing
error:

print.obj : error LNK2019: unresolved external symbol "char const * const * const luaP_opnames" (?luaP_opnames@@3QBQBDB) referenced in function "void __cdecl PrintCode(struct Proto const *)" (?PrintCode@@YAXPBUProto@@@Z)
../bin/luac.exe : fatal error LNK1120: 1 unresolved externals

(when linking project for Lua compiler)

Now   I've   found   out   that   this   is   caused by one #ifndef in
opcodes.h:

#ifdef LUA_OPNAMES
extern const char *const luaP_opnames[];  /* opcode names */
#endif

If  I  add  a "#define LUA_OPNAMES" just before this switch everything
compiles  and  works fine. Is it some kind of incompatibility issue in
VC7 or a bug or there is something I don't know?

Best regards,
Konstantinas Vaðkevièius
aka wAxEn
mailto:waxen@erdves.lt