1

我在 Windows 7(64 位)上。

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

我试图用这个 nim 包装器(https://github.com/judofyr/sodium.nim )构建 libsodium ( https://github.com/jedisct1/libsodium 我已经编译了 libsodiumVS2013 -> Release Win32

我看到libsodium.lib 我已经将 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>

任何想法?

4

1 回答 1

1

我在 Linux 上遇到同样的错误,将其作为错误提交:https ://github.com/nim-lang/Nim/issues/3962

于 2016-03-11T15:17:38.340 回答