Re: Wrap C++ procedure / Parameter type float / shared library

2017-12-07 Thread dodo11
Actually "importc" is working well. I just missed to tell Nim the direction to the shared library. So adding `{.link: "cpp/calc.so".}` and using either `importc: "calculation"` or `importcpp: "calculation(@)"` seems to be the solution.

Re: Wrap C++ procedure / Parameter type float / shared library

2017-12-07 Thread dodo11
Unfortunately there is also an error when using "importc". So I will check how to implement the interface between Nim and C++ with class instance as first parameter. ...the shared library will be modified related to Nims needs Thanks so far!!

Re: Wrap C++ procedure / Parameter type float / shared library

2017-12-07 Thread dom96
Try `importc`, `importcpp` assumes the first parameter is a class instance.

Wrap C++ procedure / Parameter type float / shared library

2017-12-06 Thread dodo11
Hello, I like to set up a "Jester" (example.nim) to handle some data transmitted by a httpRequest and using a shared library (calc.so) made with C++ to do some calculation on the data before sending it back to client. The Header file calc.h that seems to be necessary for nim-compilation looks