I wanna try to make a ".exe" file using lua code.
I've tried lua.org but i don't understand anything about it.
i've followed tutorials but they all don't help.
It would help me alot if there was a setup file that does all the setup and
lets me able to make .lua files.
Thank you for trying to help!
There's nothing built in to Lua that will let you do this, so you need to either write some C code yourself or use a third-party tool. If you want to go the third-party route, https://github.com/PG1003/dogfood is an example of such a tool.
Related
A bit of a general question, but what is the most popular/common/easiest way of creating a custom pcore?
I have seen some examples and they were mostly done on Matlab and since I do not have Matlab anywhere, I am a bit lost here. There has got to be a proper way of doing without it!
Thank you in advance!!!
You can create it with VHDL or Verilog languages, but after that you need to make few files like .mdp and .pao, create directory move all the files there and then put the directory to a library.
Detailed information you can find in Xilinx Manual
I am facing out a problem when I am trying to call some functions from one module A to a module C.
I have two separate .erl files, which are two erlang files, I have some functions in modulo A that would like to see in module C, but it is not working fine.
Maybe someone can help me with this.
Arigatou!
I think you are talking about Erlang right? try to correct you Post's title =).
Well it seems that you are not importing the module A into C.
try importing your A module like this:
-import(Module,Functions).
and export your functions from module A also.
you can find additional information here:
enter link description here
Regards. =)
I like the help which is provided by --help-module. Here you can read how to add new libraries and which variables are being set. Because I only occasionally create a framework from scratch I only add libraries once and forget how to add them for the next time.
So, if I want to create a new project I only have to make a quick search with --help-module and the package I want to use. Unfortunately OpenCV is not in this list. So, I am curious if there is a way to add a help for Opencv?
TLTR; I want to add a help for OpenCV. Where I can refresh my mind on how to find opencv and how link against it etc.
I doubt this can be done.
The help module is generated from the RST CMake documentation. You are not supposed to add it there. It should be part of the documentation from the project which provides the module.
So, I want to obfuscate my lua code. I search for lua obfuscators on google and this site comes http://www.capprime.com/CapprimeLuaObfuscator/CapprimeLuaObfuscator.aspx. Also, I've seen many other site mention it too as a good obfuscator. But when I copy and paste my code to see that... the exact same code is generated. Why is that so? You can also test this by giving a sample input, that same output is generated. Are any good obfuscators around behind this? Thanks
As far as i know there are no obfuscators for Lua due to the fact that Lua allows you to implement your own obfuscator. Please read the C api of Lua and there you have ways of implementing your own file reader for lua files. By using that approach you can obfuscate/encrypt/decrypt on load of the file.
I've been trying to load a library into lua file. Sparing the details, as they are not really important, I have tried this many ways.
The final way, and the one I believe to be correct although I still can't get it to work, is to use "package.loadlib". See code:
ed = package.loadlib("Encode_Decode.lua", "luaopen_ed")
print(ed)
But when I run the program I get this error:
Encode_Decode.lua is either not designed to run on Windows or it
contains an error. Try installing the program again using the original
installation media or contact your system administrator or the
software vendor for support.
I know the program runs because I used it internally to test it's encoding and decoding abilities and it worked fine. I'd really prefer not moving the contents of the library over as my main lua file is crowded as it is. I will if I have to though.
Yes it is in the main folder. I've also tried changing the extension of the library file into a .dll, with the same error.
What am I doing wrong?
I apologize in advance if this is a duplicate, I did my best to research this problem as thoroughly as I could. But to be honest it's almost 3 AM and I've been searching for almost an hour.
Stupid beginner mistake, used the wrong syntax.
require("Encode_Decode")
print(dec("bnVs")) --returns "nul"
package.loadlib is used for loading shared libraries; i.e. .dll or .so files. You're passing a .lua file to it, so Windows attempts to load it as a .dll and fails when it can't.
To load Lua source code, you can use dofile. Alternatively, you can use require, which is a bit more complex, but handles loading modules only once and works with both Lua and C modules.