Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:33:58+00:00 2026-06-17T13:33:58+00:00

I have successufully compiled my spellcheck program and libspellcheck library. Now my problem is

  • 0

I have successufully compiled my spellcheck program and libspellcheck library. Now my problem is allowing other developers to use my libspellcheck. I created a simple test program:

#include <spellcheck.h>
#include <iostream>

using namespace std;

int main(void)
{

    bool spell_result = check_spelling("english.dict", "abed");

    if(spell_result == true)
    {
        cout << "your dictionary / libspellcheck works!" << endl;
    }
    else
    {
        cout << "problem with your dictionary / libspellcheck" << endl;
    }

    return 0;
}

If everything is functioning fine, the program will output:

your dictionary / libspellcheck works

However, this program won’t even compile. I used:

g++ -lspellcheck -o test test.cpp

And it did not work. I believe this is a problem with the header file, as the compiler gives me this:

test.cpp: In function ‘int main()’:
test.cpp:9:59: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
test.cpp:9:59: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/tmp/ccIz3ivT.o: In function `main':
test.cpp:(.text+0x19): undefined reference to `check_spelling(char*, char*)'
collect2: ld returned 1 exit status

The only problem is, spellcheck.h is located in /usr/include, which is where I believe it should be. My question is, how do I fix this error, and was a it a problem with my header file or was it a problem with my libspellcheck. If you need to look at additional code, I will gladly provide it, as spellcheck and libspellcheck are licensed under the GPL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:34:00+00:00Added an answer on June 17, 2026 at 1:34 pm

    Assuming your check_spelling declaration in header is correct, try this:

    g++ -o test test.cpp -lspellcheck
    

    (-l should be after the objects depending on the libraries in the command line). As of the header, it is indeed found and used, or you would get an error from the compiler, not the linker.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully compiled a C-program by GCC on Mac with GD2 library installed
I have successfully compiled lua in my mac. It works. It runs. Now, I
I have successfully compiled the FFMPEG library to android using NDK. I want to
I have my program written in C++ and it is can be successfully compiled
I have compiled a simple win32 app successfully with bc++ (2 lines excerpt only):
I have got a problem when I try to make following simple connections QSpinBox
I have successfully created a Java program that runs fine on my development computer,
I have successfully compiled PHP 5.4.9 on Cygwin, but now I am unable to
I have successfully compiled node.js using cygwin on windows. The problem is that my
I want to use DCMTK in my application and have successfully compiled DCMTK 3.6.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.