aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Aspell-user] Tutorial crashes on VC++ 2005


From: Mariusz Łapiński
Subject: [Aspell-user] Tutorial crashes on VC++ 2005
Date: Thu, 16 Aug 2007 14:54:36 +0200
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Greetings.

I'm loosing a battle with aspell-dev-0-50-3-3\lib\aspell-15.lib. Here's my VC++ 2005 code:

#include "../aspell-dev-0-50-3-3/include/aspell.h"
#pragma comment ( lib, "../aspell-dev-0-50-3-3/lib/aspell-15.lib" )

int _tmain(int argc, _TCHAR* argv[])
{
   //
   // Prepare the configuration for the speller initialization.
   //
   AspellConfig* spellConfig = new_aspell_config();
   aspell_config_replace(spellConfig, "lang", "en_US");
aspell_config_replace(spellConfig, "dict-dir", "C:/Program Files/Aspell/dict");

   //
   // Try to create and initialize a new speller.
   //
AspellCanHaveError* possibleError = new_aspell_speller(spellConfig); // <- Yikes!

   AspellSpeller* speller = NULL;
   if (aspell_error_number(possibleError) != 0)
   {
       const char* errorMessage = aspell_error_message(possibleError);
       // No dictionary has been found.
   }
   else
   {
       speller = to_aspell_speller(possibleError);
   }

   return 0;
}

As long as the Aspell doesn't find the proper dictionary, the errorMessage indicates "No word lists can be found for the language ...", however in case it finds the dict, everything crases violently (terminate-like failure). I couldn't find anything helpful in the existing mailing archive, so I'm forced to ask for help.

Best regards
- - Mario




reply via email to

[Prev in Thread] Current Thread [Next in Thread]