Open tajmone opened 5 years ago
I've finally managed to compile my Nim application that uses nimfuzzy via the following batch:
nim cpp ^
--passC:"-std=c++11" ^
--passC:"-DFTS_FUZZY_MATCH_IMPLEMENTATION" ^
test.nim
It looks like compilation failure was due to the missing -DFTS_FUZZY_MATCH_IMPLEMENTATION
option. Could you clarify better this problem? I though that having installed nimfuzzy via Nimble was sufficient to ensure that all compiler settings would be in place for project using this package.
Maybe it's worth adding a few notes on this in the nimfuzzy documentation.
I had this defined in the nimble file:
https://github.com/genotrance/nimfuzzy/blob/master/nimfuzzy.nimble#L31
I presumed folks would read it but guess it would be better to explain in the readme as well.
We could also just do {.passC: "--std=c++11 -DFTS_FUZZY_MATCH_IMPLEMENTATION".}
and make things simpler.
I had this defined in the nimble file:
https://github.com/genotrance/nimfuzzy/blob/master/nimfuzzy.nimble#L31
I presumed folks would read it but guess it would be better to explain in the readme as well.
Yes, this is how I ultimately managed to compile it. Since I'm new to Nim, I thought that this was only required by the numfuzzy package setup and that by including nimfuzzy it would all be taken care of.
Adding a few notes to the package documentation would be a good idea, especially since the ntf_fuzzy_match documentation doesn't provide compilation guidelines (except a comment in the source file).
We could also just do
{.passC: "--std=c++11 -DFTS_FUZZY_MATCH_IMPLEMENTATION".}
and make things simpler.
That would be great!
Hi @genotrance ,
I'm experiencing problems using nimfuzzy under Windows 10 x64, Nim v0.20.0, GCC 6.3.0.
I've installed nimfuzzy via Nimble, and when I run the included test it compiles fine.
Yet, when I try to use nimfuzzy from my own code, I get the following compiler error:
The error seems to be related to GCC and
#include <cstdint>
, for I get the same error when trying to compile the C++ (11) example that ships withfts_fuzzy_match
— I haven't managed to compile that example at all.The strange thing is that
nimfuzzy/tests/fuzztest.nim
compile fine. So the problem seems to be a conflict with the default Nim compile configuration.Any ideas if there are compile switches to fix that?