How to import Lua packages to Love?

Asked

Viewed 120 times

2

I was observing the example files of the moon (more specifically the iup), and the dial.wlua example caught my attention a lot... I thought it would be interesting a game using this base, for time travel, for example, and tried to import the iuplua package to main.lua (putting at the beginning of the code iuplua: require("iuplua") and require("iupluacontrols") ). Upshot:

inserir a descrição da imagem aqui

In short: How can I import this and other packages from the moon to löve2D?

1 answer

1

When you give a require("iup"), interpreter will search for the iup file in a number of directories, depending on the configuration of your module system. In your case, the places where LOVE searched for iup appear in the error message. The simplest way to solve the problem would be to move the iup file to one of these directories.

  • Interestingly, it has no "iuplua.dll" file, so I decided to copy all the files with the iup prefix, and even then error... I realized that there was "iuplua51.dll", and I tried to request it, and the result is that it simply starts and closes on time, as if it opened, gave an error and closed, but I did not print any error! I tried to rename "iuplua51.dll" to "iuplua.dll", and the same strange fault happens!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.