[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pspell] Assertion `h != 0' failed, using c-API
From: |
Troels Arvin |
Subject: |
[pspell] Assertion `h != 0' failed, using c-API |
Date: |
Sun, 04 Jun 2000 18:42:27 +0200 |
Hello pspell folks,
I want to write af PHP extension for pspell. Before starting out, I
thought that I'd get familiar with the c-api in a very simple, little
program.
So I wrote this:
=========================================================
/*
spellcheck.c
Is compiled by entering
gcc -o spellcheck -lpspell spellcheck.c
*/
#include <stdio.h>
#include <pspell/pspell.h>
int main()
{
PspellConfig * pcon;
PspellCanHaveError * perr;
PspellManager * pman;
const char myWord[20]="apple";
const char myLang[10]="en-US";
printf("myWord is '%s'; myLang is '%s'\n",myWord,myLang);
pcon=new_pspell_config();
pspell_config_replace(pcon, "language-tag",myLang);
perr=new_pspell_manager(pcon);
printf("Stage 1");
pman=to_pspell_manager(perr);
/*
Here, I want to do spell checking
*/
delete_pspell_manager(pman);
delete_pspell_config(pcon);
return(0);
}
=========================================================
The program compiles without errors or warnings, but when I run the
resulting "spellcheck" program, this happens:
myWord is 'apple'; myLang is 'en-US'
spellcheck: manager_impl.cc:30: class PspellCanHaveError *
new_pspell_manager(class PspellConfig *): Assertion `h != 0' failed.
Aborted (core dumped)
I also tried compiling the example c-program from the pspell tar file.
The same thing happened.
What am I doing wrong?
PS:
The system is Red Hat Linux 6.2 on the IA32 (Pentium II) platform.
--
Greetings from Troels Arvin, Copenhagen, Denmark
dipCard.com
- [pspell] Assertion `h != 0' failed, using c-API,
Troels Arvin <=