enthus1ast
enthus1ast

Reputation: 2109

nim linker error while linking to libsodium

I'm on windows 7 (64bit).

My nim version is:Nim Compiler Version 0.12.0 (2015-12-15) [Windows: i386]

I tried to build libsodium (https://github.com/jedisct1/libsodium) with this nim wrapper (https://github.com/judofyr/sodium.nim) I've compiled libsodium with VS2013 -> Release Win32

I see the libsodium.lib i've placed the nim wrapper next to it.

So it looks like this:

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

now i tried to compile the wrapper with nim c nimwrapper.nim

now i see the following error message:

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>

Any idea?

Upvotes: 1

Views: 250

Answers (1)

def-
def-

Reputation: 5403

I get the same error on Linux, submitted it as a bug: https://github.com/nim-lang/Nim/issues/3962

Upvotes: 1

Related Questions