vinhkhuc / JFastText

Java interface for fastText
Other
228 stars 100 forks source link

Statically linked fasttext #6

Closed ELind77 closed 7 years ago

ELind77 commented 7 years ago

Hi,

I'm trying to deploy to a system that doesn't support c++11 and I'd like to statically compile the c libs in jfasttext. I can get fasttext to compile fine with the -static flag for gcc but when I add that flag to the maven file is gets overridden by some default options somewhere. Can you help me get this to compile a statically linked fasttext with JNI bindings?

Eric

vinhkhuc commented 7 years ago

Hi Eric, I haven't tried to compile fasttext with static linking. Just wonder if you tried to update pom.xml as follows:

<compilerOptions>
    <compilerOption>-std=c++0x</compilerOption>
    <compilerOption>-static</compilerOption>
    <compilerOption>-I${project.build.sourceDirectory}/../cpp</compilerOption>
</compilerOptions>

i.e. adding the new compiling option "-static"

vinhkhuc commented 7 years ago

I'm closing this one. Feel free to reopen it.