1
votes

Win7 Service Pack 1 Matlab 2013b

Hello

I am trying to include a libfaad2.dll lib (which I got ready compiled) to Matlab so I can use the functions. I try this with the loadlibrary command. But I get the error message libfaad.dll is not a valid win32 application! from matlab.

A short examination of libfaad2.dll with DependencyWalker (x64 Version) showed that it needs c:\windows\system32\Kernel32.dll. But there is also shown that 2 functions are not available in kernel32.dll

---> So I guess this is not a Matlab Problem

BUT the c:\windows\sysWow64\kernel32.dll includes the desired functions!

How can I tell matlab, or generally, that the libfaad2.dll file should use the sysWow64\kernel32.dll ?

1
" I got some error messages which I can t understand" - If you don't share them with us, we're most likely to be in the same position. At first sight it smells like a 32-bit vs 64-bit issue, but you really need to give specific details of what you have done and what errors you get.Roger Rowland
Thanks for the comment. Next time I will specify the problem more precise!user3214896
Found a solution: Installing 32 bit version of Matlab and try with this. Worked at first try! More detailed: Win7 has 2 different folders for system .dlls C:\windows\system32: Here are all the .dlls for 64-bit software and not for 32! C:\windows\SysWoW64: WoW64 stands for "Windows on 64-bit Windows", and it contains all the 32-bit binary files required for compatibility, which run on top of the 64 bit Windows. Using 32-bit version Matlab will use the SysWoW64 files. And that is the rigth kernel32.dll which contains all the functions needed!user3214896

1 Answers

0
votes

Found a solution: Installing 32 bit version of Matlab and try with this. Worked at first try!

More detailed: Win7 has 2 different folders for system .dlls

C:\windows\system32: Here are all the .dlls for 64-bit software and not for 32!

C:\windows\SysWoW64: WoW64 stands for "Windows on 64-bit Windows", and it contains all the 32-bit binary files required for compatibility, which run on top of the 64 bit Windows.

Using 32-bit version, Matlab will use the SysWoW64 files. And that is the rigth kernel32.dll which contains all the functions needed!