2016-03-11 49 views
1

我在Windows 7(64位)上。链接到libsodium时出现nim链接器错误

我NIM的版本是:Nim Compiler Version 0.12.0 (2015-12-15) [Windows: i386]

我试着用这个NIM包装(https://github.com/judofyr/sodium.nim) 我编译libsodium与VS2013 -> Release Win32

我看libsodium.lib 我已经放在打造libsodium(https://github.com/jedisct1/libsodium)它旁边的nim包装。

所以它看起来像这样:

\libsodium-1.0.2\Build\Release\Win32\nimwrapper.nim 
\libsodium-1.0.2\Build\Release\Win32\libsodium.lib 

现在我试图编译 nim c nimwrapper.nim

现在我看到下面的错误信息包装:

C:\Users\hello\Downloads\libsodium-1.0.2\Build\Release\Win32>nim c nimwrapper.nim 
Hint: system [Processing] 
Hint: nimwrapper [Processing] 
Hint: strutils [Processing] 
Hint: parseutils [Processing] 
CC: nimwrapper 
c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\nimwrapper.c: In function 'nimwrapperInit000': 
c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\nimwrapper.c:449:2: error: incompatible type for argument 1 of 'HEX24_108328' 
    LOC2 = HEX24_108328(sig_108406); 
^
In file included from c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\nimwrapper.c:9:0: 
c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\nimwrapper.c:330:27: note: expected 'struct Signature108092 *' but argument is of type ' 
Signature108092' 
N_NIMCALL(NimStringDesc*, HEX24_108328)(Signature108092* sig) { 
         ^
C:\Nim\lib/nimbase.h:168:57: note: in definition of macro 'N_NIMCALL' 
# define N_NIMCALL(rettype, name) rettype __fastcall name 
                 ^
Hint: [Link] 
gcc.exe: error: c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\nimwrapper.o: No such file or directory 
Error: execution of an external program failed: 'gcc.exe -o c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimwrapper.exe c:\users\hello\do 
wnloads\libsodium-1.0.2\build\release\win32\nimcache\stdlib_parseutils.o c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\stdlib_strutils 
.o c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcache\stdlib_system.o c:\users\hello\downloads\libsodium-1.0.2\build\release\win32\nimcac 
he\nimwrapper.o -lsodium ' 

C:\Users\hello\Downloads\libsodium-1.0.2\Build\Release\Win32> 

任何想法?

+0

PS:我试着编译它几次在过去。但我放弃了。我永远无法链接它。 – enthus1ast

回答

相关问题