Jump to content
The simFlight Network Forums

Lua error module not found in P3D


Recommended Posts

Bonjour,

I certainly need new glasses.

 

I am trying my FSX lua script in P3D and I have this problem on require('saitek').

 

 514055 *** LUA Error: error loading module 'saitek' from file 'C:\Program Files (x86)\Lockheed Martin\Prepar3D v3\modules\lua\saitek.dll':
The specified module could not be found.
 
But it seems to be here !

 

any idea ?

lua.jpgCheers

Claude

Link to comment
Share on other sites

Sorry, I don't know. FSUIPC only reports the error returned by Windows -- the text too.

 

I'm always suspicious when things are installed in the Windows' Program Files folders, because those are protected. See if it works when you run P3D in administrator mode.

 

Also right-click on the saitek.dll itself and look in Properties to see if it may be marked by Windows as access denied. Windows sometimes does that for some reason.

 

Finally try putting the DLL somewhere else, outside of Program Files, and see if that works (you'd need to change the Lua program too to address it properly).

 

Pete

Link to comment
Share on other sites

Finally try putting the DLL somewhere else, outside of Program Files, and see if that works (you'd need to change the Lua program too to address it properly).

 

I tried this

local lib,err = package.loadlib("C:\\saitek_dll\\saitek.dll","luaopen_saitek");

 
I have the same error The specified module could not be found.
 
I created a empty dll with the same name using notepad, and then the message is different.
%1 is not a valid Win32 application.
 
That seems normal as the module is empty.
So the module is well located by the require function but the return code is module not found when the dll is valid.
Strange !
 
P3D is run in admin mode, and I see nothing which can prevent windows to load the dll.
I also tried with another dll (gd.dll which is a graphic lua library) and I have the same problem.
 
Claude
Link to comment
Share on other sites

 

I tried this

local lib,err = package.loadlib("C:\\saitek_dll\\saitek.dll","luaopen_saitek");

 
I have the same error The specified module could not be found.
 
I created a empty dll with the same name using notepad, and then the message is different.
%1 is not a valid Win32 application.
 
That seems normal as the module is empty.
So the module is well located by the require function but the return code is module not found when the dll is valid.
Strange !
 
P3D is run in admin mode, and I see nothing which can prevent windows to load the dll.
I also tried with another dll (gd.dll which is a graphic lua library) and I have the same problem

 

Some folks using FSUIPC4 on P3D also have the problem with my own SimConnectP3D2.dll, which the FSUIPC installer places in the Modules folder for loading and using as its SimConnect interfacr because P3D2 and P3D3 do not install an FSX SimConnect themselves. This is why I've had to have a pinned note at the top of this forum, to advise those suffering how to install an FSX version.

 

I've never found out why Windows reports that the DLL cannot be found. It is very very annoying and I can appreciate your frustration. Unfortunately, since I don't understand how it can possibly happen I have no answers. I wish I did. It doesn't happen on any of my Win7 systems, and there are plenty of Win8 and Win10 users for which this is okay too.

 

So, if you do find the reason and/or a solution, please do let me know. I'm wondering it is is related to dependencies in the module concerned -- i.e. missing other DLLs which it relies upon. In such cases, however, I would have expected a different error. Maybe it's being mis-reported by Windows?

 

There is a free program called "Dependency Walker".  Perhaps you can use that to check if Saitek.DLL needs something you don't have installed. http://dependencywalker.com/

 

Pete

Link to comment
Share on other sites

 Perhaps you can use that to check if Saitek.DLL needs something you don't have installed. http://dependencywalker.com/

I have the dependencywalker and will have a look, but I have doubt because if I try as I said a lua graphic library, I have the same problem.

The saitek dll is working with fsx, and I make a disk image to try P3D.

Claude

Link to comment
Share on other sites

I have the dependencywalker and will have a look, but I have doubt because if I try as I said a lua graphic library, I have the same problem.

The saitek dll is working with fsx, and I make a disk image to try P3D.

 

So is it something related to the process (P3D rather than FSX) it is being loaded into? Curiouser and curiouser ...

 

Pete

Link to comment
Share on other sites

Yes Curious indeed !

After making my disk image and before installing P3D; I have uninstall all that was concerning FSX... May be something has disappear.
I saw on the web that the not found error can be related to a dependency problem of the dll.

I' ll check later... its tea time now  :)

Claude

Link to comment
Share on other sites

After teatime...

I do not know why but the runtime VC 2015 was missing. it is incredible as it was installed on the FSX disk, and I made an image of it on a new disk before installing P3D.

So I am sure I never uninstall it... or may be a mishandling .

Anyway the window message is not clear.

Thanks Pete

Bon week-end.

Cheers

Claude

Link to comment
Share on other sites

After teatime...

I do not know why but the runtime VC 2015 was missing. it is incredible as it was installed on the FSX disk, and I made an image of it on a new disk before installing P3D.

So I am sure I never uninstall it... or may be a mishandling .

Anyway the window message is not clear.

 

Aha!

 

What's the DLL filename for that? MSVCR150.DLL?  Maybe it's the same with my SmConnectP3D2.DLL. It apparently needs MSVCP100.DLL and MSVCR100.DLL. Perhaps I should package them into my installer too, just in case?

 

Or maybe I need to get VS 2012 and re-build with that -- I see P3D needs MSVCP120.DLL and MSVCR120.DLL. I didn't really want to have to fork out for a new version though :-(

 

Pete

Link to comment
Share on other sites

Aha!

 

What's the DLL filename for that? MSVCR150.DLL?  Maybe it's the same with my SmConnectP3D2.DLL. It apparently needs MSVCP100.DLL and MSVCR100.DLL. Perhaps I should package them into my installer too, just in case?

 

Or maybe I need to get VS 2012 and re-build with that -- I see P3D needs MSVCP120.DLL and MSVCR120.DLL. I didn't really want to have to fork out for a new version though :sad:

 

Pete

 

The DLL missing were VCRUNTIME140.DLL , MSVCP140.DLL and MSVCR140.DLL part of the Visual C++ Redistributable for Visual Studio 2015.

 

Claude

Link to comment
Share on other sites

The DLL missing were VCRUNTIME140.DLL , MSVCP140.DLL and MSVCR140.DLL part of the Visual C++ Redistributable for Visual Studio 2015.

 

Claude

 

Thanks. So it's a similar problem with my SimConnectP3D2 needing the 100 version DLLs. I'll work out a solution for that too.

 

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.