PDA

View Full Version : Problem loading a dll



hubbobubbo
7th January 2010, 16:19
Hi

I am using resolve to dynamically load my functions. I have a windows project and a windows mobile project.

I have two problems:

1. if I do
QLibrary library("my file");
library.load()
if(!library.isLoaded)
{
qFatal("Problem loading dll")
}

For Windows I always get isLoaded == false but it works anyway, I can call all functions. So it is just strange but not a showstopper. All calls to resolve return successful.

2. For Windows mobile I have the dll in the right folder and I have tried various paths. Like with Windows the isLoaded returns false but for Windows Mobile all calls to resolve fail and I cannot use the dll.

The dll has the declspec set to export and is wrapped in entern C. It works to load it via .NET and the same dll compiled for Windows works (with the isLoaded issue above). However for Windows Mobile I can not get it to resolve.

Thankful for any ideas on what to look for.

Tanuki-no Torigava
8th January 2010, 01:19
May be because of limited WinCE linker functionality. Look here (http://support.microsoft.com/kb/326163) and here (http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/02dd00c8-736b-4a96-8d91-0348776f9d24). Might help.

hubbobubbo
8th January 2010, 16:56
Thanks for the reply, I think you might be right I managed to track down this error print inside QT
Cannot load library "name" : Not enough storage space available to complete this operation.

My lib is only 1mb and apart from that I basically have no other code so it seems as just QtCore and QtGui makes it impossible to lad an additional dll on Windows Mobile.

Not sure how to proceedd with this. I do want dynamic linking.