tmikolov / word2vec

Automatically exported from code.google.com/p/word2vec
Apache License 2.0
1.52k stars 542 forks source link

Undefined symbols: _fgetc_unlocked #48

Open ryandesign opened 4 years ago

ryandesign commented 4 years ago

The latest code in the repository does not build on macOS:

/usr/bin/clang word2vec.c -o word2vec -O3 -arch x86_64 -lm -pthread -Wall -funroll-loops
word2vec.c:74:10: warning: implicit declaration of function 'fgetc_unlocked' is invalid in C99 [-Wimplicit-function-declaration]
    ch = fgetc_unlocked(fin);
         ^
1 warning generated.
Undefined symbols for architecture x86_64:
  "_fgetc_unlocked", referenced from:
      _ReadWord in word2vec-f21758.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [word2vec] Error 1
Genie-Liu commented 4 years ago

there's a pr to fix this. https://github.com/tmikolov/word2vec/pull/40