Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on import #3

Closed
general-rishkin opened this issue Apr 25, 2021 · 5 comments
Closed

Error on import #3

general-rishkin opened this issue Apr 25, 2021 · 5 comments

Comments

@general-rishkin
Copy link

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.

@general-rishkin general-rishkin changed the title Error on compilation Error on import Apr 26, 2021
@bitstormFA
Copy link
Owner

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.

@general-rishkin
Copy link
Author

general-rishkin commented May 20, 2021 via email

@bitstormFA
Copy link
Owner

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 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

@general-rishkin
Copy link
Author

general-rishkin commented May 20, 2021 via email

@bitstormFA
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants