Page 2 of 4

Re: HELP! How to make a dll available for Love2D ?

Posted: Tue Apr 07, 2015 9:39 am
by s-ol
arampl wrote:Try rebuild dll with VS or QT Creator.
His build system isn't the problem, he manages to build working DLLs for standalone Lua. And doesn't QTCreator use the same toolchain anyway (MinGW)?

Re: HELP! How to make a dll available for Love2D ?

Posted: Tue Apr 07, 2015 9:47 am
by dracula004
S0lll0s wrote:Maybe you are building The DLL for an incompatible lua version? Löve is Lua 5.1 / Luajit, your "regular" lua might be 5.2.
I build it with lua5.1.4.

Re: HELP! How to make a dll available for Love2D ?

Posted: Tue Apr 07, 2015 10:02 am
by arampl
S0lll0s wrote:
arampl wrote:Try rebuild dll with VS or QT Creator.
His build system isn't the problem, he manages to build working DLLs for standalone Lua. And doesn't QTCreator use the same toolchain anyway (MinGW)?
http://wiki.qt.io/Mingw:

"There are actually different MinGW toolchains and packages available:

MinGW.org is the original project. The latest version gcc 4.7.2. It only compiles for 32 bit binaries.

MinGW-w64 is a fork with the original aim to also support generation of 64 bit binaries. By now it also supports a much larger part of the Win32 API. The MinGW-w64 project does host several different binary packages, done by different people.

There are binary installers targetting MinGW for both Qt 4 and Qt 5. Up to Qt 4.8.6, Qt 4 ones are built with a MinGW.org toolchain using gcc 4.4. Newer Qt 4.8 binary packages ship with a mingw-w64 based toolchain. For Qt 5, a newer MinGW-w64 toolchain is actually required."

(I mean that MinGW-w64 improves not only 64-bit stuff)

I've thought Code::Blocks is outdated somehow and MinGW too.

@dracula004: Are you sure you need cpp and not plain c for your library?

Re: HELP! How to make a dll available for Love2D ?

Posted: Thu Apr 09, 2015 2:23 pm
by dracula004
arampl wrote:
S0lll0s wrote:
arampl wrote:Try rebuild dll with VS or QT Creator.
His build system isn't the problem, he manages to build working DLLs for standalone Lua. And doesn't QTCreator use the same toolchain anyway (MinGW)?
http://wiki.qt.io/Mingw:

"There are actually different MinGW toolchains and packages available:

MinGW.org is the original project. The latest version gcc 4.7.2. It only compiles for 32 bit binaries.

MinGW-w64 is a fork with the original aim to also support generation of 64 bit binaries. By now it also supports a much larger part of the Win32 API. The MinGW-w64 project does host several different binary packages, done by different people.

There are binary installers targetting MinGW for both Qt 4 and Qt 5. Up to Qt 4.8.6, Qt 4 ones are built with a MinGW.org toolchain using gcc 4.4. Newer Qt 4.8 binary packages ship with a mingw-w64 based toolchain. For Qt 5, a newer MinGW-w64 toolchain is actually required."

(I mean that MinGW-w64 improves not only 64-bit stuff)

I've thought Code::Blocks is outdated somehow and MinGW too.

@dracula004: Are you sure you need cpp and not plain c for your library?
As same with the luamidi:https://github.com/dwiel/luamidi, it built with g++ 8 years ago,works well in love2d today.

Re: HELP! How to make a dll available for Love2D ?

Posted: Fri Apr 10, 2015 12:22 pm
by Lapin
Oh you can use Lua FFI.
Example :

https://github.com/CapsAdmin/goluwa/blo ... s/init.lua

And it works.

Re: HELP! How to make a dll available for Love2D ?

Posted: Mon Apr 13, 2015 3:48 pm
by dracula004
Lapin wrote:Oh you can use Lua FFI.
Example :

https://github.com/CapsAdmin/goluwa/blo ... s/init.lua

And it works.
thx, I will have a try.

Re: HELP! How to make a dll available for Love2D ?

Posted: Wed Apr 15, 2015 9:44 am
by dracula004
Lapin wrote:Oh you can use Lua FFI.
Example :

https://github.com/CapsAdmin/goluwa/blo ... s/init.lua

And it works.
I tried the alien lib for lua. And the same, works well in standalone lua, but crashed in love2d...

here is the project files:
test.7z
(15.6 KiB) Downloaded 100 times
when I run main.lua in love2d, it crashes.
when I run lua_script.lua in standalone lua, it works well.

Re: HELP! How to make a dll available for Love2D ?

Posted: Wed Apr 15, 2015 3:51 pm
by I~=Spam
Can you post the error that is given in the console? Or does LOVE really crash?

Can you post the C/C++ source? That would be really helpful for us to help you. ;)

Re: HELP! How to make a dll available for Love2D ?

Posted: Sat Apr 25, 2015 6:31 am
by dracula004
I~=Spam wrote:Can you post the error that is given in the console? Or does LOVE really crash?

Can you post the C/C++ source? That would be really helpful for us to help you. ;)
The source was already attached in former post.

I'm trying to build that dll with vs.

Re: HELP! How to make a dll available for Love2D ?

Posted: Sun Apr 26, 2015 1:58 am
by I~=Spam
dracula004 wrote:The source was already attached in former post.

I'm trying to build that dll with vs.
I downloaded the source before (and just now) and there are no c or c++ files in there. Can you post the C/C++ source (not just lua) The .dll file is not really any help.