Results 1 to 4 of 4

Thread: Unable to build / compile Hunspell lib for spell checking

  1. #1
    Join Date
    Jul 2015
    Posts
    22
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Unable to build / compile Hunspell lib for spell checking

    I am trying to implement a spell checker according to this example:
    https://wiki.qt.io/Spell-Checking-with-Hunspell

    Following the links on this page to the Hunspell library took me here: https://github.com/hunspell/hunspell
    where I followed the instructions to compile Hunspell in Cygwin environment on Windows. What makes me wonder is that there is no include directory in the Hunspell master branch. In the SpellChecker.pro file that can be found here https://github.com/hunspell/hunspell there are the following lines:

    Qt Code:
    1. win32 {
    2. INCLUDEPATH += C:/path/to/hunspell/include
    3. LIBS += C:/path/to/hunspell/Release/hunspell.lib
    4. }
    To copy to clipboard, switch view to plain text mode 

    After I'm done with these instructions https://github.com/hunspell/hunspell I have neither an include directory, nor do I have a lib directory.

    What am I missing here?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Unable to build / compile Hunspell lib for spell checking

    What am I missing here?
    Did you also perform the install step? If so, do you know where it installed to? It is likely that the build is out-of-source, so it will not build or install into the source code master branch. The master branch does not have an include directory - all of the .h and .hxx files are in the src directory. Making install likely creates the include directory in the install location and copies the appropriate header files to it, and also creates a lib directory for the binaries and copies them there.

    The make command probably has a "verbose" option which will spew out a log of everything it is doing. If you redirect that to a file, you'll be able to go back and figure out where things are.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jul 2015
    Posts
    22
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unable to build / compile Hunspell lib for spell checking

    Cygwin installed the include directory and the lib directory to an "unexpected" path: C:\cygwin64\usr\local\...
    Besides, it did not generate a .lib File, but instead I got:
    C:/cygwin64/usr/local/lib/libhunspell-1.7.a
    C:/cygwin64/usr/local/lib/libhunspell-1.7.dll.a
    C:/cygwin64/usr/local/lib/libhunspell-1.7.la

    So, currently the include works, i. e. the files that use an #include "hunspell.hxx" compile, but I get a linker error when building the project. I think I need a .lib file so I need to convince Cygwin to generate me one?!? Or else, I need to use another tool for building the lib-file?!?

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Unable to build / compile Hunspell lib for spell checking

    AFAIK, linux does not use .lib files. Static libraries are .a, shared libraries are .so. .la are files used by libtools. See this stackoverflow post.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 7
    Last Post: 4th February 2020, 14:41
  2. Unable to compile an Example
    By learner in forum Newbie
    Replies: 11
    Last Post: 15th November 2010, 16:27
  3. Adding spell checking to lineedits, textedits, ...
    By jiveaxe in forum Qt Programming
    Replies: 12
    Last Post: 7th October 2009, 10:04
  4. Is there any spell checking in QTextEdit?
    By naoyamakino in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2009, 20:57
  5. How disable auto spell checking
    By oashton in forum KDE Forum
    Replies: 1
    Last Post: 31st January 2006, 11:51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.