[prev in list] [next in list] [prev in thread] [next in thread]
List: aspell-user
Subject: [Aspell-user] How to use Aspell in my C++ program?
From: Ray Shen <ray.ilab () gmail ! com>
Date: 2005-10-20 11:03:59
Message-ID: 001601c5d565$fe2de140$a0b67c8c () raynotebook
[Download RAW message or body]
Hi!
I have to say it first: I'm a beginner to both C++ and Linux programming,
so, please allow me to ask some dumb question.
I've read the README file come along with Aspell source files for several times,
however, I still don't know how to incorporate Aspell into my C++ program.
I'm using Fedora 4 on VMWare + Eclipse 3.1 + CDT 3.0,
and I downloaded the lateast version of Aspell which is GNU aspell-0.60.4.
Now, I'm going to write a C++ console program,
which requiring to perform some word by word checking to see if a word is in EN \
dictionary or not. Here is what I did:
./configure
make
...
chmod 755 scripts/run-with-aspell
sh ./scripts/mkconfig 0.60.4 /usr/local/share /usr/local/lib/aspell-0.60
make[1]: Leaving directory `/home/db2admin/Desktop/aspell-0.60.4'
Making all in po
make[1]: Entering directory `/home/db2admin/Desktop/aspell-0.60.4/po'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/db2admin/Desktop/aspell-0.60.4/po'
Making all in manual
make[1]: Entering directory `/home/db2admin/Desktop/aspell-0.60.4/manual'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/db2admin/Desktop/aspell-0.60.4/manual'
make install
[db2admin@localhost aspell-0.60.4]$ make install
Making install in .
make[1]: Entering directory `/home/db2admin/Desktop/aspell-0.60.4'
make[2]: Entering directory `/home/db2admin/Desktop/aspell-0.60.4'
test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib"
/bin/sh ./libtool --mode=install /usr/bin/install -c 'libaspell.la' \
'/usr/local/lib/libaspell.la' /usr/bin/install -c .libs/libaspell.so.15.1.4 \
/usr/local/lib/libaspell.so.15.1.4 /usr/bin/install: cannot create regular file \
`/usr/local/lib/libaspell.so.15.1.4': Permission denied
/bin/sh ./libtool --mode=install /usr/bin/install -c 'libpspell.la' \
'/usr/local/lib/libpspell.la' libtool: install: warning: relinking `libpspell.la'
(cd /home/db2admin/Desktop/aspell-0.60.4; /bin/sh ./libtool --tag=CXX \
--mode=relink g++ -g -O2 -fno-exceptions -o libpspell.la -rpath /usr/local/lib \
-version-info 16:4:1 -no-undefined lib/dummy.lo libaspell.la -ldl -ldl ) g++ -shared \
-nostdlib /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crti.o \
/usr/lib/gcc/i386-redhat-linux/4.0.0/crtbeginS.o lib/.libs/dummy.o -Wl,--rpath \
-Wl,/usr/local/lib -L/usr/local/lib -laspell -ldl \
-L/usr/lib/gcc/i386-redhat-linux/4.0.0 \
-L/usr/lib/gcc/i386-redhat-linux/4.0.0/../../.. -lstdc++ -lm -lc -lgcc_s \
/usr/lib/gcc/i386-redhat-linux/4.0.0/crtendS.o \
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crtn.o -Wl,-soname -Wl,libpspell.so.15 \
-o .libs/libpspell.so.15.1.4 /usr/bin/ld: cannot find -laspell
collect2: ld returned 1 exit status
libtool: install: error: relink `libpspell.la' with the above command before \
installing it make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/db2admin/Desktop/aspell-0.60.4'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/db2admin/Desktop/aspell-0.60.4'
make: *** [install-recursive] Error 1
[db2admin@localhost aspell-0.60.4]$
Seeing these output, I believe that something was going wroung.
Can someone tell me in detail how to use Aspell in my own program?
(Where should I put the source files? What command should I issue? What should I \
include in my program? etc.) Or, else, can someone give me any advice about is there \
better solution if I'd only need to know whether a word is correctly spelled?
Thank in advance.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi! </DIV>
<DIV>I have to say it first: I'm a beginner to both C++ and Linux
programming,</DIV>
<DIV>so, please allow me to ask some dumb question.</DIV>
<DIV>I've read the README file come along with Aspell source files for several
times,</DIV>
<DIV>however, I still don't know how to incorporate Aspell into my C++
program.</DIV>
<DIV>I'm using Fedora 4 on VMWare + Eclipse 3.1 + CDT 3.0,</DIV>
<DIV>and I downloaded the lateast version of Aspell which is GNU
aspell-0.60.4.</DIV>
<DIV>Now, I'm going to write a C++ console program, </DIV>
<DIV>which requiring to perform some word by word checking to see if a word is
in EN dictionary or not.</DIV>
<DIV>Here is what I did:</DIV>
<DIV> ./configure</DIV>
<DIV> make</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV>...</DIV>
<DIV>chmod 755 scripts/run-with-aspell<BR>sh ./scripts/mkconfig 0.60.4
/usr/local/share /usr/local/lib/aspell-0.60<BR>make[1]: Leaving directory
`/home/db2admin/Desktop/aspell-0.60.4'<BR>Making all in po<BR>make[1]:
Entering directory `/home/db2admin/Desktop/aspell-0.60.4/po'<BR>make[1]:
Nothing to be done for `all'.<BR>make[1]: Leaving directory
`/home/db2admin/Desktop/aspell-0.60.4/po'<BR>Making all in
manual<BR>make[1]: Entering directory
`/home/db2admin/Desktop/aspell-0.60.4/manual'<BR>make[1]: Nothing to be done
for `all'.<BR>make[1]: Leaving directory
`/home/db2admin/Desktop/aspell-0.60.4/manual'</DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV> make install</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV> [db2admin@localhost aspell-0.60.4]$ make install<BR>Making
install in .<BR>make[1]: Entering directory
`/home/db2admin/Desktop/aspell-0.60.4'<BR>make[2]: Entering directory
`/home/db2admin/Desktop/aspell-0.60.4'<BR>test -z "/usr/local/lib" || mkdir
-p -- "/usr/local/lib"<BR> /bin/sh ./libtool --mode=install
/usr/bin/install -c 'libaspell.la'
'/usr/local/lib/libaspell.la'<BR>/usr/bin/install -c
.libs/libaspell.so.15.1.4
/usr/local/lib/libaspell.so.15.1.4<BR>/usr/bin/install: cannot create
regular file `/usr/local/lib/libaspell.so.15.1.4': Permission
denied<BR> /bin/sh ./libtool --mode=install /usr/bin/install -c
'libpspell.la' '/usr/local/lib/libpspell.la'<BR>libtool: install: warning:
relinking `libpspell.la'<BR>(cd /home/db2admin/Desktop/aspell-0.60.4;
/bin/sh ./libtool --tag=CXX --mode=relink g++ -g -O2 -fno-exceptions
-o libpspell.la -rpath /usr/local/lib -version-info 16:4:1 -no-undefined
lib/dummy.lo libaspell.la -ldl -ldl )<BR>g++ -shared -nostdlib
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/4.0.0/crtbeginS.o
lib/.libs/dummy.o -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib
-laspell -ldl -L/usr/lib/gcc/i386-redhat-linux/4.0.0
-L/usr/lib/gcc/i386-redhat-linux/4.0.0/../../.. -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/i386-redhat-linux/4.0.0/crtendS.o
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crtn.o -Wl,-soname
-Wl,libpspell.so.15 -o .libs/libpspell.so.15.1.4<BR>/usr/bin/ld: cannot find
-laspell<BR>collect2: ld returned 1 exit status<BR>libtool: install: error:
relink `libpspell.la' with the above command before installing
it<BR>make[2]: *** [install-libLTLIBRARIES] Error 1<BR>make[2]: Leaving
directory `/home/db2admin/Desktop/aspell-0.60.4'<BR>make[1]: ***
[install-am] Error 2<BR>make[1]: Leaving directory
`/home/db2admin/Desktop/aspell-0.60.4'<BR>make: *** [install-recursive]
Error 1<BR>[db2admin@localhost aspell-0.60.4]$</DIV>
<DIV> </DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV dir=ltr>Seeing these output, I believe that something was going
wroung.</DIV>
<DIV dir=ltr>Can someone tell me in detail how to use Aspell in my own
program?</DIV>
<DIV dir=ltr>(Where should I put the source files? What command should I issue?
What should I include in my program? etc.)</DIV>
<DIV dir=ltr>Or, else, can someone give me any advice about is there
better solution if I'd only need to know whether a word is correctly
spelled?</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Thank in advance.</DIV></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic