Need a help to compile vc++ project with aspell library

Hi,

I am trying to use aspell library.

I download aspell-dev-0-50-3-3.zip from http://aspell.net/win32/

include aspell.h, link aspell-15.lib and on run time have problems with the dll.

please advise.

Thanks

Udi Raz
UdiRazAsked:
Who is Participating?
 
jkrCommented:
>>I renamed the lib to dll and tried to use it as a dll

Aaaargh, that cannot work. The DLL is not included in http://ftp.gnu.org/gnu/aspell/w32/aspell-dev-0-50-3-3.zip , instead use http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe

BTW, one other "safe" (in terms of bullet-proof) solution would be to place the DLL in the system32 forlder, this will also ensure that multiple apps always use the same DLL vresion.
0
 
Infinity08Commented:
>> have problems with the dll.

What kind of problems ?
0
 
Deepu AbrahamR & D Engineering ManagerCommented:
What is the error which you are getting? Use dependency walker to find if your application has loaded the dll.
www.dependencywalker.com
Best Regards,
DeepuAbrahamK

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
evilrixSenior Software Engineer (Avast)Commented:
>> Use dependency walker to find if your application has loaded the dll.
Eh? Dependency Walker shows it has a dependency, not if it's loaded it or not.
0
 
UdiRazAuthor Commented:
Ok, here is what I did :

copied from the zip file the following files : aspell.h, aspell-15.lib, libaspell-15-dll.lib.

Try 1 : linked with aspell-15.lib
Result 1 : on run time I got an error message that search for a missing aspell-15.dll.

Since there was no dll attached, I tried to rename libaspell-15-dll.lib to libaspell-15.dll hoping it will work, but it didn't.

Try 2 : linked to libaspell-15-dll.lib ( hoping this is a static library ). wrote the code below ( taken from http://aspell.net/man-html/Through-the-C-API.html#Through-the-C-API )
Result 2 : Unhandled exception on the first line ( Unhandled exception at 0x00022bc0 in AspellTest.exe: 0xC0000005: Access violation reading location 0x00022bc0.)

Thanks
AspellConfig * aspellConfig = new_aspell_config();
 
aspell_config_replace( aspellConfig, "lang", "en_US");

Open in new window

0
 
evilrixSenior Software Engineer (Avast)Commented:
Have you installed ASpell so that the DLL is available and in the path?
Maybe this link wilkl help: https://support.kayako.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=125
0
 
evilrixSenior Software Engineer (Avast)Commented:
Did that help?
0
 
jkrCommented:
Preferrably place aspell-15.dll in the directory where your application resides. For more information on how Windows tries to locate DLLs, see http://msdn2.microsoft.com/en-us/library/ms682586.aspx ("Dynamic-Link Library Search Order")
0
 
UdiRazAuthor Commented:
I installed and used application before I tried to use its dll and it works fine.

When I renamed the lib to dll and tried to use it as a dll I got a message error that says that this dll is not a windows image !!! Therefore, renaming the lib was worng. My problem is not that the application could not find the dll.
0
 
evilrixSenior Software Engineer (Avast)Commented:
As per what jkr suggested above, try to locate the DLL and copy it into the same folder as your program to see if that fixes it. If so it is just a DLL location issue. The link jkr provided can give you more guidence on this.
0
 
jkrCommented:
Addenum: a .lib file only serves as input to the linker, see http://msdn2.microsoft.com/en-us/library/ba1z7822(VS.80).aspx (".lib Files as Linker Input"), DLLs are their runtime counterpart (http://msdn2.microsoft.com/en-us/library/1ez7dh12(VS.80).aspx)
0
 
UdiRazAuthor Commented:
Thank.. again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.