Something wierd when using C++ with C_API of lua

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
zzzc18
Prole
Posts: 1
Joined: Tue May 26, 2020 9:10 am

Something wierd when using C++ with C_API of lua

Post by zzzc18 »

I have been using archlinux and windows10 to develop a game with LOVE11.3 and lua5.1.5. Everything goes well until this moring. When I ran the game on Win10, it says
Error: error loading module 'lib.calcDistance' from file '..\lib\calcDistance.dll':
找不到指定的程序。
Chinese characters above means "The specified module could not be found".
The most wierd thing about this is that it went ok last night, then I shutdown my laptop, went to bed, got up, turn on my laptop, run it, and it went bad.

I met this before so I tried several ways to solve it but got nothing. I checked package.cpath, the .dll file position,
my CMakeLists.txt, my g++/mingw-make, cleaned build files, disabled some funtions and so on. Meanwhile, it still works on ArchLinux with KDE.

I asked a friend of mine to compile this code on his Win10 and send me back the .dll files, it suddenly works after I replace the old ones with them, and I can even complie to get the "correctly dll" by myself. However, it went bad just an hour later.

This is pretty wierd. Have you met this kind of problems before? Dealing with this problem for several hours is driving me mad :( .
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 25 guests