kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.5k stars 512 forks source link

Several Issues with building on Windows #252

Open aksharbhatnagar opened 4 years ago

aksharbhatnagar commented 4 years ago

I get the errors: fatal error C1083: Cannot open source file: '..\lm\builder\print.cc': No such file or directory fatal error C1083: Cannot open source file: '..\lm\builder\print.hh': No such file or directory

while building the project lmplz. One can check that both the files actually don't exist in the said location.

Also, earlier there was the issue of duplicate include in kenlm.vxproj where the line <ClCompile Include="..\lm\value_build.cc" /> occurs twice namely on lines 223 and 244 in kenlm.vxproj. I commented one of the lines and it compiled successfully (also had to set the Character Set as "Not Set" in project configuration properties for a "Cannot convert CHAR to LPWSTR" error ) on Visual Studio 2017.

Back to the error in lmplz, commenting the includes for print.cc and print.hh in lmplz.vcxproj solves that error but then I get the LNK2019 errors:

I suspect that these could be due to the missing print.hh and print.cc files.

horsti371 commented 4 years ago

I found print.hh and print.cc inside the $kenlm-dir$\lm\common directory. Compiling was successful for me after adding print.hh, print.cc, renumber.hh, renumber.cc, model_buffer.hh, model_buffer.cc, size_option.hh and size_option.cc from that directory to the lmplz project.

kpu commented 4 years ago

Pull request please?

aksharbhatnagar commented 4 years ago

@horsti371 okay, will try this