[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&nbsp;but that make sure I can use it in my C++ 
program.</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV>&nbsp; 1&nbsp;&nbsp;&nbsp; #include "aspell.h"</DIV>
  <DIV>&nbsp; 2</DIV>
  <DIV>&nbsp; 3&nbsp;&nbsp;&nbsp; AspellConfig *new_aspell_config();</DIV>
  <DIV>&nbsp; 4</DIV>
  <DIV>&nbsp; 5&nbsp;&nbsp;&nbsp; int main(int argc, char* argv[])<BR>&nbsp; 
  6&nbsp;&nbsp;&nbsp; {<BR>&nbsp; 7&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
  AspellSpeller * speller;<BR>&nbsp; 8&nbsp;<BR>&nbsp; 9&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp; AspellConfig *cfg = 
  new_aspell_config();<BR>10&nbsp;<BR>11&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp; aspell_config_replace(cfg, "lang", "en_US");</DIV>
  <DIV>12</DIV>
  <DIV>13&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; return 
  0;<BR>14&nbsp;&nbsp;&nbsp; }</DIV></BLOCKQUOTE>
<DIV>&nbsp;</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&nbsp;Description&nbsp;Resource&nbsp;In 
  Folder&nbsp;Location&nbsp;Creation Time<BR>2&nbsp;&nbsp; undefined reference 
  to `aspell_config_replace'&nbsp;Main.cpp&nbsp;HelloAspell&nbsp;line 11&nbsp;十月 
  27, 2005 4:10:35 上午<BR>2&nbsp;&nbsp; undefined reference to 
  `new_aspell_config'&nbsp;Main.cpp&nbsp;HelloAspell&nbsp;line 9&nbsp;十月 27, 
  2005 4:10:35 上午<BR>1&nbsp;&nbsp; unused variable 
  ‘speller’&nbsp;Main.cpp&nbsp;HelloAspell&nbsp;line 7&nbsp;十月 27, 2005 4:10:35 
  上午<BR>2&nbsp;&nbsp; *9: undefined reference to `new_aspell_config' 
  ../Main.cpp:11: undefined reference to `aspell_config_replace'&nbsp;</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp; Main.o&nbsp;HelloAspell/Debug&nbsp;line 
  0&nbsp;十月 27, 2005 4:10:35 上午<BR>2&nbsp;&nbsp; *g++ -oHelloAspell 
  ./Main.o&nbsp; In function 
  `main':&nbsp;Main.o&nbsp;HelloAspell/Debug&nbsp;line 0&nbsp;十月 27, 2005 
  4:10:35 上午<BR>2&nbsp;&nbsp; *** [HelloAspell] Error 
  1&nbsp;HelloAspell&nbsp;&nbsp;&nbsp;十月 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