Failing to build jnlua for win64

31 views
Skip to first unread message

Michi

unread,
Jun 12, 2012, 5:38:36 PM6/12/12
to jnlua-...@googlegroups.com
Hi!

I want to build jnlua for my 64 bit windows 7. I know there are precompiled versions, but I want to know how to do it myself :)

I downloaded http://sourceforge.net/projects/luabinaries/files/5.2/Windows%20Libraries/Dynamic/lua-5.2_Win64_dll10_lib.zip/download and unpacked it, and let the makefile point to that directory. Then I run my VC 10 Express Console and type nmake. This is what I get:

...\jnlua-1.0.2\src\main\c\Win32>nmake

Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

        link /nologo /DLL /LTCG /OUT:jnlua52.dll /LIBPATH:"C:\dev\omikron\lua\win64_dll10" lua52.lib jnlua.obj
   Bibliothek "jnlua52.lib" und Objekt "jnlua52.exp" werden erstellt.
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_tolstring".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__luaL_newstate".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__luaL_requiref".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_pushnumber".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_yieldk".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__luaL_getmetafield".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__luaopen_debug".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_createtable".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__luaopen_bit32".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_rawset".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_getmetatable".
...
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_rawseti".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_pushboolean".
jnlua.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__lua_touserdata".
jnlua52.dll : fatal error LNK1120: 82 nicht aufgelöste externe Verweise.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"": Rückgabe-Code "0x460"
Stop.

Can you give me a hint why this is not working as expected?

Thanks!
 Michi

Andre Naef

unread,
Jun 12, 2012, 6:02:40 PM6/12/12
to jnlua-...@googlegroups.com

Are you explicitly launching the 64 bit console? The default start menu entry of VC is for the 32 bit console, even when running on a 64 bit system. To check, change out of the console launch directory (as the cl.exe found there is 32 bit at all times), and then launch cl.exe from the configured path.

 

OK output: Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64

NOT OK: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86

Michi

unread,
Jun 12, 2012, 6:07:48 PM6/12/12
to jnlua-...@googlegroups.com
Thanks for the quick response!

You are right, the 32 bit version is being used. But I still get the same linker errors when trying to build the 32 bit version. I think I am missing something else.. :(

Andre Naef

unread,
Jun 12, 2012, 7:39:08 PM6/12/12
to jnlua-...@googlegroups.com

Try running dumpbin /all on your lua52.lib file, and pay specific attention to the number of underscores following __imp. Building a 32 bit version against a 64 bit DLL/LIB will not work, of course.

 

From: jnlua-...@googlegroups.com [mailto:jnlua-...@googlegroups.com] On Behalf Of Michi
Sent: Mittwoch, 13. Juni 2012 00:08
To: jnlua-...@googlegroups.com
Subject: Re: Failing to build jnlua for win64

 

Thanks for the quick response!

You are right, the 32 bit version is being used. But I still get the same linker errors when trying to build the 32 bit version. I think I am missing something else.. :(

On Wednesday, June 13, 2012 12:02:40 AM UTC+2, Andre Naef wrote:

Are you explicitly launching the 64 bit console? The default start menu entry of VC is for the 32 bit console, even when running on a 64 bit system. To check, change out of the console launch directory (as the cl.exe found there is 32 bit at all times), and then launch cl.exe from the configured path.

 

OK output: Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64

NOT OK: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86

 

Reply all
Reply to author
Forward
0 new messages