Understand C++ binding with OpenCV.

2022-06-10 Thread k0zmo
Most likely - when the Nim's manual was created GCC's ld.bfd that everyone used was built as such that `--as-needed` flag wasn't a default option. Since then most of the Linux distributions do package ld.bfd with `--as-needed` flag on by default. For dynamic libraries it doesn't discard them dur

Understand C++ binding with OpenCV.

2022-06-08 Thread k0zmo
Quite frankly - I don't know. Looking at the compiler code ([pragmas.nim](https://github.com/nim-lang/Nim/blob/415689323c625afb7d39d923c4165a541beb9927/compiler/pragmas.nim#L1083) and [extccomp.nim](https://github.com/nim-lang/Nim/blob/415689323c625afb7d39d923c4165a541beb9927/compiler/extccomp.n

Understand C++ binding with OpenCV.

2022-06-07 Thread AMoura
Great, it was the problem. But why in Nim doc **link** pragma is used ?

Understand C++ binding with OpenCV.

2022-06-07 Thread AMoura
This command doesn't show special any information :(

Understand C++ binding with OpenCV.

2022-06-07 Thread k0zmo
Just by looking at linker invocation: g++ -o /mnt/c/OpenCVNim/OpenCVNim /mnt/c/OpenCVNim/extern/opencv-install/lib/libopencv_world.so /home/echopouet/.cache/nim/OpenCVNim_d/stdlib_digitsutils.nim.cpp.o /home/echopouet/.cache/nim/OpenCVNim_d/stdlib_dollars.nim.cpp.o /home/echop

Understand C++ binding with OpenCV.

2022-06-06 Thread demotomohiro
Is same linker error generated even if you write your code in C++ and build it with g++ or clang? Could you run nim with `--listcmd` option? It shows how linker command is called.

Understand C++ binding with OpenCV.

2022-06-05 Thread AMoura
Hello, I try to bind C++ OpenCV version to understand how to made it. So I created a little "useless" Nim file: {.passc: "-I/mnt/c/OpenCVNim/extern/opencv-install/include/opencv4", link: "/mnt/c/OpenCVNim/extern/opencv-install/lib/libopencv_world.so".} const mat = "