• matthew@hierthinking.com

Forum

Please or Register to create posts and topics.

Cannot load fwlib32.dll

Hello,

i am having trouble even starting a focas program. I keep getting this error:

System.DllNotFoundException: Unable to load DLL 'FWLIB32.dll' or one of its dependencies

I added code and files in directory in the attachment.

 

 

Uploaded files:
  • You need to login to have access to uploads.

Hey there!

Thanks for taking the time to visit the site. The error you are getting is from the fwlib32.dll as you said. However, the DLL does not get included in the project dependencies. You will need to copy the fwlib32.dll into the SysWow64 folder of the computer you are using to run your program. Keep this in mind, because if you move your program to another computer, you will need to copy the DLL to that computer as well. Let me know if that helps.

a s and Robert Stafford have reacted to this post.
a sRobert Stafford

It was a step in the right direction. I put the dll in syswow64, but it didn't, then I put it in system32 and it worked (I think it has to do with 32 vs 64bit).

So thank you, wouldn't have figured it out on my own. Might post again soon 🙂

 

Oh yeah also got this error in the process:

System.BadImageFormatException: An attempt was made to load a program with an incorrect format.

If anyone has that problem its probably a 32 vs 64 bit mismatch.

Well I am glad I could point you in the right direction. I always get mixed up with which folder it goes in. Anyway, thank you for the reply back. If you have any other issues or if you find anything you would like to share with the community, feel free to create a new topic.

The approach I use for vendor DLLs (like fwlib32.dll) is to add a PostBuild to my project that copies the vendor DLLs to my OutDir (where the program will be built). For example, here's my PostBuild for a project that uses OpenSSL libraries:

copy $(OPENSSL)\release\bin\*.dll $(OutDir)

If your project is in git, you can add a git submodule for the Focas libraries and use that path in your PostBuild command as the source of the DLLs to copy.

 

Hi Kenneth,

Normally, this is my approach as well, however, I had had issues with this in the past with the Focas libraries. I am sure I could have figured out a solution if I tried, but it was much more simple to just throw them into the System32/SysWow64 folder. But if it works for you, that's a much better solution.