/home/asd/.cache/nim/convexhull_d/stdlib_system.nim.cpp: In function ‘void addQuoted__wOoLVA8v8QsIhW1wmcoEBg(NimStringDesc*&, tySequence__9apztJSmgERYU8fZOjI4pOg*)’:
^
|
tySequence__9apztJSmgERYU8fZOjI4pOg*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
compiling this:
faces: seq[seq[cint]]
# populate faces...
# check
for face in faces: # this line generates the error, for i in 0..faces.high works
for ix in face:
let v=vertices[ix]
Can you share some more info? Your Nim version? I'm also assuming you're compiling with the C++ backend, right?
Also can you share the full program or try to minimize it before posting?
hi, thanks for your prompt reply,
Nim Compiler Version 1.4.8 [Linux: amd64] Compiled at 2021-07-19 Copyright (c) 2006-2021 by Andreas Rumpf
active boot switches: -d:release
souce code link:
https://github.com/rforcen/nim/tree/main/convex_hull
as mentioned before i've just changed cint to int32 and it now compiles @line:51 faces: seq[seq[int32]] so the problem comes when using cint as a type of a seq[seq[]]
Hi, I reproduced and minimized the error you came upon, it boils down to this:
var a: seq[cint]
var b: seq[int32]
echo a
echo b
When compiling that with the C++ backend on the latest Nim one gets a C++ compiler error:
CC: convexhull.nim
/home/tiber/.cache/nim/convexhull_d/@mconvexhull.nim.cpp: In function ‘void NimMainModule()’:
/home/tiber/.cache/nim/convexhull_d/@mconvexhull.nim.cpp:315:40: error: cannot convert ‘tySequence__48JTohSgTy339bRxHzUD8KA*’ to ‘tySequence__9apztJSmgERYU8fZOjI4pOg*’
315 | T2_[0] = dollar__convexhull_63(b_convexhull_2);
| ^~~~~~~~~~~~~~
| |
| tySequence__48JTohSgTy339bRxHzUD8KA*
/home/tiber/.cache/nim/convexhull_d/@mconvexhull.nim.cpp:245:101: note: initializing argument 1 of ‘NimStringDesc* dollar__convexhull_63(tySequence__9apztJSmgERYU8fZOjI4pOg*)’
245 | N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar__convexhull_63)(tySequence__9apztJSmgERYU8fZOjI4pOg* x) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Error: execution of an external compiler program 'g++ -c -std=gnu++14 -funsigned-char -w -fmax-errors=3 -fpermissive -I/home/tiber/Things/Nim/lib -I/home/tiber/Projects/nim/convex_hull -o /home/tiber/.cache/nim/convexhull_d/@mconvexhull.nim.cpp.o /home/tiber/.cache/nim/convexhull_d/@mconvexhull.nim.cpp' failed with exit code: 1