voikko / corevoikko

Libvoikko and essential linguistic resources
Other
89 stars 25 forks source link

Fails to build within Eclipse and NDK: data.hpp not found #10

Closed frodberserk closed 8 years ago

frodberserk commented 10 years ago

There is a file named Autocorrect.cpp in src/autocorrect. In the file, it includes autocorrect/data.hpp file. But I can't find it in the folder. Please help.

hatapitk commented 10 years ago

This file is generated source code. Just build the library by running "make" and it is one of the first things that will be generated.

frodberserk commented 10 years ago

I am building it in eclipse using NDK. But it is showing error. Actually the Autocorrect.cpp file has some data structures named NODES etc which it can't find, so it is not compiling.

frodberserk commented 10 years ago

[armeabi] Compile++ thumb: voikko-jni <= AutoCorrect.cpp jni/corevoikko/libvoikko/src/autocorrect/AutoCorrect.cpp:43:32: fatal error: autocorrect/data.hpp: No such file or directory compilation terminated. make.exe: *\ [obj/local/armeabi/objs/voikko-jni/corevoikko/libvoikko/src/autocorrect/AutoCorrect.o] Error 1

This is the error.

hatapitk commented 10 years ago

My guess is that Eclipse adds some builddir switches that the build system incorrectly ignores. If you could find out what those are and post them here I could try to come up with a fix.

Meanwhile the commands that you can use to generate the file manually are

cd src
python ./autocorrect/triecompiler.py ./../data/autocorrect/fi_FI.xml autocorrect/data.hpp
frodberserk commented 10 years ago

Can you please provide the file?

hatapitk commented 8 years ago

The autocorrect data is now part of dictionary format 5. Thus it is no longer built as a part of default configuration of libvoikko.