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 7989327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:43:30+00:00 2026-06-04T12:43:30+00:00

After I managed to get Hunspell working with a Win32 console application , I

  • 0

After I managed to get Hunspell working with a Win32 console application, I want to use Hunspell in an MFC application in the same solution.
I get the following error when I try to compile the MFC application.

spellcheck\hunspell-src\hunspell\replist.hxx(23): error C2062: type 'const char' unexpected
spellcheck\hunspell-src\hunspell\replist.hxx(23): error C2238: unexpected token(s) preceding ';'

Some information about the solution:

  • The solution is called spellcheck.
  • The Hunspell source files are located in spellcheck\hunspell-src\hunspell and spellcheck\hunspell-src\win_api.
  • The project libhunspell has been imported and compiles without errors.
  • A console application in the solution uses the same hunspell dll/source files and has no errors.
  • The console application has been setup accordingly to this thread
  • The folders HunSpell-Src and HunSpell-Dic are NOT located in a project folder but in the solution folder spellcheck and referenced properly.

I have setup the MFC application as following:

  1. Added a new MFC application (SDI) as project to the solution called MFC2.
  2. Added a reference to the project libhunspell to MFC2.
  3. Project > Properties > Configuration Properties > C++ > General > Additional Include Directories has been set to: ..\hunspell-src\hunspell;%(AdditionalIncludeDirectories) (the same as the console application)
  4. Project > Properties > Configuration Properties > Linker > General > Additional Library Directories has been set to: ..\hunspell-src\win_api\Debug_dll\libhunspell;%(AdditionalLibraryDirectories) (the same as the console application)
  5. Added #include "../HunSpell-Src/win_api/hunspelldll.h"under #include MainFrm.h in Mainfrm.cpp.

I decided to put the #include of hunspelldd.h in Mainfrm.cpp and omit setting up a dialog and calling it in order to keep this question as short as possible. Nevertheless I have setup a project as described that produces said error messages.

Because the console application compiles fine, I assume something MFC specific is causing the problem.

Thank you for your help.

  • 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-04T12:43:32+00:00Added an answer on June 4, 2026 at 12:43 pm

    Add “#undef near” before class declaration in replist.hxx

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

Sidebar

Related Questions

After countless headaches and time wasted I managed to get the AudioRecorder working for
I have managed to get my click event working with the following code. When
Hi guys after the help in another post I managed to get the following
I'm working on MFC win32 project. I have dialog with 2 CMFCEditBrowseCtrl controls. After
After some struggling I managed to get boost smart pointers to build for Windows
After cobbling together a few questions I've managed to get this far to showing
After surprisingly little hacking about, I managed to get libc++ installed on my Linux
I've managed to get the back end working for an android app, where it
Right, after much struggle I finally managed to get a sort of shared folder
I've managed (after much difficulty) to get to the second step of the installation

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.