Re: Tutorial crashes on VC++ 2005

[email protected]
Newsgroups gmane.comp.gnu.aspell.user
Message-ID <081620071633.13888.46C47C58000A9BB7000036402160376316099D0A9B9B0A9C@att.net>
Hi Mariusz,

Just in case it is useful, you are welcome to check out my effort:
http://sourceforge.net/projects/descdatadiary
The above uses aspell for a spell check.
Note that my stuff is for VC 6.0. Others have ported to VS, I'm surprised you didn't find anything.

-------------- Original message ----------------------
From: Mariusz £apiñski <[email protected]>
>
> 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
> 
> 
> _______________________________________________
> Aspell-user mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/aspell-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.