lua-users home
lua-l archive

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


I compile LUAC.exe linked LUA.DLL _dynamic library_.
Probably, there would be no error when linking with the a LUA.lib static
library.

I think the problem is that 'luaU_dump', 'luaP_opmodes', 'luaP_opnames' are
not exported from DLL.

For instance, the 'luaU_dump' look like :

  int luaU_dump(lua_State *L, const Proto *f, lua_Writer w, void *data,
              int strip) {
  ...
  }

But, to link with DLL, should be:

  LUA_API int luaU_dump(lua_State *L, const Proto *f, lua_Writer w, void
*data,
              int strip) {
  ...
  }

Charles

-----Message d'origine-----
De : lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] De la
part de Luiz Henrique de Figueiredo
Envoyé : vendredi 12 décembre 2014 11:43
À : Lua mailing list
Objet : Re: [ANN] Lua 5.3.0 (rc0) now available

> luac.obj : error LNK2019: unresolved external symbol _luaU_dump 
> luac.obj : error LNK2001: unresolved external symbol _luaP_opmodes 
> luac.obj : error LNK2001: unresolved external symbol _luaP_opnames 
> C:\7\lua53\Lua\Debug\Luac.exe : fatal error LNK1120: 3 unresolved
externals
> Build FAILED.

I don't understand this. Linking lua.obj with lua.lib (or whatever name
it is) should resolve these symbols. Anyone else has this problem?

This hasn't changed at all from 5.2 to 5.3...