[libvoikko] VoikkoSpellService (MacOS X) fails to build on OS X 10.6

Sjur Moshagen sjurnm at mac.com
Tue Apr 27 18:58:55 EEST 2010


Den 27. apr. 2010 kl. 17.49 skrev Harri Pitkänen:

> On Tuesday 27 April 2010, Sjur Moshagen wrote:
>> The errors all seem to be syntax error complains of the following two
>> types:
>> 
>> /usr/local/include/libvoikko/voikko.h:61:0
>> /usr/local/include/libvoikko/voikko.h:61: error: expected ‘=’, ‘,’, ‘;’,
>> ‘asm’ or ‘__attribute__’ before ‘*’ token
>> 
>> 
>> /usr/local/include/libvoikko/voikko.h:67:0
>> /usr/local/include/libvoikko/voikko.h:67: error: expected ‘)’ before ‘*’
>> token
> 
> Thanks for noticing this. The error is reproducable on Linux too when 
> compiling with GCC in C (as opposed to C++) mode. Since libvoikko and most 
> real world applications using it are written in C++ it is common that 
> something not compatible with plain C goes to the header file and nobody 
> notices.
> 
> In this case the problem is that C++ allows struct types to be used without 
> struct keyword but C (and apparently Objective C) does not. Replacing 
> "VoikkoHandle" with "struct VoikkoHandle" everywhere in voikko.h should fix 
> this if you are in a hurry but I'll try to fix this in SVN soon.

I did, and those errors disappeared. Then I did the same with "struct VoikkoGrammarError", and another seven errors disappeared:)

Now I'm at the following errors:


/Users/sjur/voikko/osxspell/VoikkoSpellService.m: In function 'main':
/Users/sjur/voikko/osxspell/VoikkoSpellService.m:111: warning: class 'VoikkoSpellService' does not implement the 'NSSpellServerDelegate' protocol


ld: warning: directory '/Users/sjur/voikko/inst/lib' following -L not found
ld: warning: in /usr/local/lib/libvoikko.1.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_voikko_next_token_cstr", referenced from:
      -[VoikkoSpellService spellServer:findMisspelledWordInString:language:wordCount:countOnly:] in VoikkoSpellService.o
  "_voikko_suggest_cstr", referenced from:
      -[VoikkoSpellService spellServer:suggestGuessesForWord:inLanguage:] in VoikkoSpellService.o
  "_voikko_spell_cstr", referenced from:
      _voikkoCheckWord in VoikkoSpellService.o
  "_voikko_set_bool_option", referenced from:
      _main in VoikkoSpellService.o
      _main in VoikkoSpellService.o
  "_voikko_free_suggest_cstr", referenced from:
      -[VoikkoSpellService spellServer:suggestGuessesForWord:inLanguage:] in VoikkoSpellService.o
  "_voikko_init_with_path", referenced from:
      _main in VoikkoSpellService.o
ld: symbol(s) not found
collect2: ld returned 1 exit status





More information about the Libvoikko mailing list