[prev in list] [next in list] [prev in thread] [next in thread]
List: aspell-user
Subject: [Aspell-user] Using Aspell on Fedora 4 + Eclipse3.1 + CDT
From: Ray Shen <ray.ilab () gmail ! com>
Date: 2005-10-26 19:36:37
Message-ID: 001701c5da64$99b0c210$a0b67c8c () raynotebook
[Download RAW message or body]
Hi!
Since last time I wrote, I believe that I've successfully installed Aspell.
However, there're still some questions bothering me...
I don't know how to correctly write a program to use it... ^^"
I wrote a simple HelloAspell program as below:
It does nothing but that make sure I can use it in my C++ program.
1 #include "aspell.h"
2
3 AspellConfig *new_aspell_config();
4
5 int main(int argc, char* argv[])
6 {
7 AspellSpeller * speller;
8
9 AspellConfig *cfg = new_aspell_config();
10
11 aspell_config_replace(cfg, "lang", "en_US");
12
13 return 0;
14 }
When I try to complie it with "Compile All" option in Eclipse, I get the following \
error message: Severity Description Resource In Folder Location Creation Time
2 undefined reference to `aspell_config_replace' Main.cpp HelloAspell line 11 \
十月 27, 2005 4:10:35 上午 2 undefined reference to `new_aspell_config' Main.cpp \
HelloAspell line 9 十月 27, 2005 4:10:35 上午 1 unused variable ‘speller’ \
Main.cpp HelloAspell line 7 十月 27, 2005 4:10:35 上午 2 *9: undefined reference \
to `new_aspell_config' ../Main.cpp:11: undefined reference to `aspell_config_replace' \
Main.o HelloAspell/Debug line 0 十月 27, 2005 4:10:35 上午
2 *g++ -oHelloAspell ./Main.o In function `main': Main.o HelloAspell/Debug line \
0 十月 27, 2005 4:10:35 上午 2 *** [HelloAspell] Error 1 HelloAspell 十月 27, \
2005 4:10:35 上午 Can anyone give me some indication which part do I missed?
Do I forget to do anything?
Oh! I'm using Fedora 4 + Eclipse3.1 + CDT,
and I'm using a "managed C++ project" which means I don't have to write my own \
Makefile. Thanks for your help!!
[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>Since last time I wrote, I believe that I've successfully installed
Aspell.</DIV>
<DIV>However, there're still some questions bothering me... </DIV>
<DIV>I don't know how to correctly write a program to use it... ^^"</DIV>
<DIV>I wrote a simple HelloAspell program as below:</DIV>
<DIV>It does nothing but that make sure I can use it in my C++
program.</DIV>
<DIV> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV> 1 #include "aspell.h"</DIV>
<DIV> 2</DIV>
<DIV> 3 AspellConfig *new_aspell_config();</DIV>
<DIV> 4</DIV>
<DIV> 5 int main(int argc, char* argv[])<BR>
6 {<BR> 7
AspellSpeller * speller;<BR> 8 <BR> 9
AspellConfig *cfg =
new_aspell_config();<BR>10 <BR>11
aspell_config_replace(cfg, "lang", "en_US");</DIV>
<DIV>12</DIV>
<DIV>13 return
0;<BR>14 }</DIV></BLOCKQUOTE>
<DIV> </DIV>
<DIV>When I try to complie it with "Compile All" option in Eclipse, I get the
following error message:</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV>Severity Description Resource In
Folder Location Creation Time<BR>2 undefined reference
to `aspell_config_replace' Main.cpp HelloAspell line 11 十月
27, 2005 4:10:35 上午<BR>2 undefined reference to
`new_aspell_config' Main.cpp HelloAspell line 9 十月 27,
2005 4:10:35 上午<BR>1 unused variable
‘speller’ Main.cpp HelloAspell line 7 十月 27, 2005 4:10:35
上午<BR>2 *9: undefined reference to `new_aspell_config'
../Main.cpp:11: undefined reference to `aspell_config_replace' </DIV>
<DIV> Main.o HelloAspell/Debug line
0 十月 27, 2005 4:10:35 上午<BR>2 *g++ -oHelloAspell
./Main.o In function
`main': Main.o HelloAspell/Debug line 0 十月 27, 2005
4:10:35 上午<BR>2 *** [HelloAspell] Error
1 HelloAspell 十月 27, 2005 4:10:35 上午</DIV></BLOCKQUOTE>
<DIV dir=ltr>Can anyone give me some indication which part do I missed?</DIV>
<DIV dir=ltr>Do I forget to do anything?</DIV>
<DIV dir=ltr>Oh! I'm using Fedora 4 + Eclipse3.1 + CDT, </DIV>
<DIV dir=ltr>and I'm using a "managed C++ project" which means I don't have to
write my own Makefile.</DIV>
<DIV dir=ltr>Thanks for your help!!</DIV></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic