[libvoikko] Lttoolbox - libvoikko backend integration issues?

Harri Pitkänen hatapitk at iki.fi
Mon Mar 29 20:24:25 EEST 2010


On Monday 29 March 2010, David Cheah wrote:
> So now, in order to get a  lttoolbox configured dll, I will need to add a
> switch, and define the macro. When you say switch do you mean #ifdef? The
> switch which immediately comes to mind for me would be a switch{case:}
> statement. Also, is there a specific file I should add this switch to?
> (perhaps voikko_defines?)

Sorry for being unclear. I used word "switch" because I don't know how it is 
called in MSVC. I meant some sort of a configuration option that you can set 
when you build the project. The option should be specify whether you want to 
have support for Lttoolbox compiled in.

The equivalent thing in our autotools build system is the options you pass to 
configure script:

 ./configure --enable-lttoolbox

The necessary #ifdef is already there, see src/morphology/AnalyzerFactory.cpp. 
What you need to do is to change the MSVC project files in such way that by 
default HAVE_LTTOOLBOX is not defined, but when support for Lttoolbox is 
requested it gets defined.

> And, regarding the dll linking - when you say link libvoikko against
> lttoolbox, which dll imports into which? Or perhaps, what would be good is
> which of the resulting dlls will then be used by the programs? So far, I am
> reading it as lttoolbox is referenced in libvoikko, and then libvoikko is
> used by other parts of voikko. Or will the 2 dlls be loaded separately?

You are right, Lttoolbox should be referenced in libvoikko. Applications that 
use libvoikko should not need to know that Lttoolbox is used in the background 
so they will just reference libvoikko.


More information about the Libvoikko mailing list