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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Infinity08Commented:
>> have problems with the dll.

What kind of problems ?
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

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.
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

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

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
evilrixSenior Software Engineer (Avast)Commented:
Did that help?
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")
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.
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.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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)
UdiRazAuthor Commented:
Thank.. again
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.