-
Notifications
You must be signed in to change notification settings - Fork 2
Error on import #3
Comments
I am currently thinking about rewriting this from scratch but I will try to look into this error as soon as possible - many thanks for taking the time to report it. |
Hello
I would like to get some practical experience wrapping a C++ library.
I wonder if you could provide me with a step-by-step guide of how you
wrapped ArrayFire so I could you use it as a guide.
This would be very helpful indeed.
I am looking forward to hearing from you.
Many thanks in advance.
Gennadiy
…On Tue, 27 Apr 2021 at 09:46, bitstormGER ***@***.***> wrote:
I am currently thinking about rewriting this from scratch but I will try
to look into this error as soon as possible - many thanks for taking the
time to report it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFN45HF62XQRHYVHPNPLC3TKZ2YDANCNFSM43RRE2FA>
.
|
Hi Gennadiy, The general approach was quite easy. I used a hand written python preprocessing to get to a single, simplified header file. But this was some years ago and nowadays I would probably start with cpp2nim or something similar.. I haven't used nim a lot lately but I always felt that if interfacing complex cpp libraries would be more seamless this could be a big selling point but I guess this is technically very hard. I hope this helps |
Thanks, it does help.
I will have a look at cpp2nim although I have to say I am seriously
considering moving back to C++.
Yes, I agree with you. If Nim could have seamless interop with C++, that
would enhance its visibility. It is probably technically hard as you said
but D and Julia manage it quite well so I guess it also requires some
willingness either on the part of the Nim developers or the users.
…On Thu, 20 May 2021 at 15:50, bitstormGER ***@***.***> wrote:
Hi Gennadiy,
The general approach was quite easy. I used a hand written python
preprocessing to get to a single, simplified header file.
In the next step I fed this to c2nim, fixed the problems and experimented
with the result.
Finally I hand crafted the the Matrix type and some convenience tools to
have some simplification compared to the "pure" wrapper.
But this was some years ago and nowadays I would probably start with
cpp2nim <https://github.com/mantielero/cpp2nim> or something similar..
I haven't used nim a lot lately but I always felt that if interfacing
complex cpp libraries would be more seamless this could be a big selling
point but I guess this is technically very hard.
I hope this helps
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFN45FHVHRMLNAHR6QSXPDTOUOS7ANCNFSM43RRE2FA>
.
|
I can only test on my arch linux and can't reproduce this error at the moment, please open a new issue if this still is a problem - I will try to setup a windows test environment soon. |
I just installed ArrayfireNim and compiled with
nim cpp -r test.nim
and I get this error:C:\Users\general_riskin\.nimble\pkgs\ArrayFireNim-0.2.1\ArrayFireNim.nim(824, 1) Error: redefinition of '+='; previous declaration here: C:\Users\general_riskin\.nimble\pkgs\ArrayFireNim-0.2.1\ArrayFireNim.nim(812, 6)
.All test.nim has in it is
import ArrayFireNim
.The text was updated successfully, but these errors were encountered: