Knightro63 / flutter_angle

Flutters Almost Native Graphics Layer Engine.
4 stars 1 forks source link

Error while compiling Windows release version - fatal error LNK1181: cannot open input file 'libGLESv2.dll.lib' #1

Closed obiwanzenobi closed 2 months ago

obiwanzenobi commented 2 months ago

fatal error LNK1181: cannot open input file 'libGLESv2.dll.lib'

I wanted to check windows release version performance but got error while compiling. I see that this lib file is in the windows project.

obiwanzenobi commented 2 months ago

Ok, I solved that one by copying debug directory with dlls and creating release :)

Knightro63 commented 2 months ago

Hi @obiwanzenobi,

This was probably a flutter compiling issue.

Try running flutter clean flutter pub get flutter run -d windows.

It looks like you were able to get it to work though. Let me know if it continues to happen.

Thanks

obiwanzenobi commented 2 months ago

Got a next part of this problem - on windows that is non developer machine running example app throws missing MSVCP140D.dll - requiring dll is nothing bad but for some reason lib is requesting debug version of it.

Knightro63 commented 2 months ago

Hi @obiwanzenobi,

After looking into "missing MSVCP140D.dll" I found that it might be a flutter communication with MS Visual Studio. It seems to need to communicate with the dll file to crate the debug build files, which requires your computer to be in developer mode.

It might work without this issue if you run it in release mode. This also could be a windows 11 issue since I have been testing everything on windows 10.

Here is an article that talks about the exact thing you mentioned https://medium.com/@fluttergems/packaging-and-distributing-flutter-desktop-apps-the-missing-guide-part-2-windows-0b468d5e9e70.

You might need to always add those specific dll's to your release build for flutter UWP app distro.

Hope this helps.

obiwanzenobi commented 2 months ago

Yes, but it should not look for debug version of this dll - MSVCP140D.dll - big D at the end of the name means that this is used for debug builds. MSVCP140.dll tho is available through C++ redistributable packages, and there is no propblem if I request that one.

Did you succed compiling it in release mode for windows 10?

obiwanzenobi commented 2 months ago

Update: I was able to solve problem by using Chrome precompiled dlls - then release windows app is requesting correct dll file in release mode (MSVCP140.dll instead of MSVCP140D.dll). MSVCP140.dll is a part of Visual Studio C++ redistributable so most of the windows users have it anyway and no need of bundling anything.

I don't know if this is a correct approach but I can make PR with it.

Knightro63 commented 2 months ago

Hi @obiwanzenobi,

No the release mode did not work in Windows 10. I see the issue is that windows is missing the release dll files. I will push the update soon.

Sorry for the late reply.

Knightro63 commented 2 months ago

Hi @obiwanzenobi,

I believe the issue has been resolved.

obiwanzenobi commented 2 months ago

Yes, thanks a lot!