tonytonyjan / jaro_winkler

Ruby & C implementation of Jaro-Winkler distance algorithm which supports UTF-8 string.
MIT License
193 stars 29 forks source link

Compile error in 1.3.2 #2

Closed Arcovion closed 9 years ago

Arcovion commented 9 years ago

For some reason GCC is complaining about this on Windows: https://github.com/tonytonyjan/jaro_winkler/commit/89aa73e963d5e02adba7194cb15dad415480fdba Gist

tonytonyjan commented 9 years ago

Sorry for this mistake... I've updated to 1.3.3, I hope it's been fixed. Thank you for your reporting!

Arcovion commented 9 years ago

Sorry, I was wrong, the bug must have actually occurred in another commit: Gist Edit: The error log for v1.3.3 is identical to the 1.3.2 one FYI

tonytonyjan commented 9 years ago

I guess maybe it is caused by defining node_free as inline function.

tonytonyjan commented 9 years ago

FYI: http://stackoverflow.com/questions/19068705/undefined-reference-when-calling-inline-function

Arcovion commented 9 years ago

Yep! Removed the inline and all is well. Using -std=c99 also works fine so you can revert https://github.com/tonytonyjan/jaro_winkler/commit/d54871854e292c88485b3d0d0ac04b999fcd2dba

53c53
< inline void node_free(Node *head){
---
> void node_free(Node *head){

On line 13 you already declared it as inline, so I guess it just complains you did it twice?

tonytonyjan commented 9 years ago

Wow! You just replied while I was still struggling with tuning my Windows environment XD Thanks for saving my time. I'll release 1.3.4 later. =)

tonytonyjan commented 9 years ago

1.3.4 has been released. If everything is well, then this issue can be closed.

Arcovion commented 9 years ago

No problem, I was surprised you deciphered the error in one go!

λ gem install jaro_winkler
Fetching: jaro_winkler-1.3.4.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed jaro_winkler-1.3.4
Parsing documentation for jaro_winkler-1.3.4
Installing ri documentation for jaro_winkler-1.3.4
Done installing documentation for jaro_winkler after 0 seconds
1 gem installed

:tada:

tonytonyjan commented 9 years ago

I couldn't do this without your help. :+1: