Page 1 of 1
Pb+C-backend+luajit
Posted: Fri Jul 26, 2024 10:31 am
by useful
On the luajit download page it says:
No Release Tarballs or Binaries
LuaJIT uses rolling releases. There are no release tarballs available for download.
Please do not use obsolete versions from older tarballs or zip files. Please remove any outdated links to these downloads — these links will cease to work soon.
Do not use pseudo-releases or tarballs created by third parties. Do not use binaries offered for download by third parties.
Pre-built packages should only be installed via a trusted package manager for your operating system (distro). But you should be aware these often carry old versions that miss important fixes. Before reporting an issue, always try the latest version available from the git repository.
Distro maintainers for distros that require the fiction of a release should do frequent snapshots of a branch. Do not attempt to cherry-pick or backport individual changes, no matter how self-standing individual changes look (because they often are not).
By installing purebasic under Windows, we have gcc by default.
Theoretically, we can probably use it(gcc) to compile luajit in the same project with purebasic.
But I don't understand how to implement this in practice yet, and I have to have two gcc installations on my computer.
Re: Pb+C-backend+luajit
Posted: Fri Jul 26, 2024 11:08 am
by User_Russian
useful wrote: Fri Jul 26, 2024 10:31 amTheoretically, we can probably use it(gcc) to compile luajit in the same project with purebasic.
In PB only contains some compiler binaries, but no libraries.
Re: Pb+C-backend+luajit
Posted: Fri Jul 26, 2024 11:31 am
by useful
User_Russian wrote: Fri Jul 26, 2024 11:08 am
In PB only contains some compiler binaries, but no libraries.
It's obvious!
My question is how to configure (add the necessary minimum) for the narrow purpose of joint compilation in one pb+lua(jit) project?
p.s. And using this example, we will be able to experiment with other libraries and other things in C.
Re: Pb+C-backend+luajit
Posted: Sun Jul 28, 2024 10:22 am
by threedslider
See here if there is an useful for you :
https://github.com/Dadido3/Lua-PureBasic
Good luck.
Re: Pb+C-backend+luajit
Posted: Sun Jul 28, 2024 1:31 pm
by useful
What can I be interested in here?
Who built these DLLs and how?
https://github.com/Dadido3/Lua-PureBasi ... indows/x64
My question is how to organize a single compilation and static linking project in a single pb and luajit project.
Using gcc from the purebasic distribution.
Re: Pb+C-backend+luajit
Posted: Sun Jul 28, 2024 2:12 pm
by threedslider
It is building in Visual Studio by himself I think but you can build with GCC toolchain too (Not inside to PB).
The GCC toolchain you can find here :
https://www.msys2.org/ and follow the instruction.
The source code of Lua is C and you can find here :
https://www.lua.org/source/ and follow the instruction to build a lib.
And then come back to see the dude how he does it for purebasic interact with Lua.
You need a knowledge for that, sorry...
If you want to integrate to PB into one, it will be very difficult cause due of library... But you can take the source code from Lua or Lua+jit and you adapt to C backend in PB... Again a knowledge in C programming is needed to make your purpose and it is not guaranteed after all depend from you what do you want with Lua+jit...

Re: Pb+C-backend+luajit
Posted: Sun Jul 28, 2024 2:31 pm
by useful
threedslider wrote: Sun Jul 28, 2024 2:12 pm
... But you can take the source code from Lua or Lua+jit and you adapt to C backend in PB...
I hope that someone will give advice on moving in this direction!
That's exactly what I was asking!!!
Maybe starting with something simpler than Luajit.
p.s. I have placed it in this section intentionally as a wish for the development of the tool. So that we could combine pb & c in one project, given that gcc is included.
Re: Pb+C-backend+luajit
Posted: Sun Jul 28, 2024 3:02 pm
by threedslider
useful wrote: Sun Jul 28, 2024 2:31 pm
I hope that someone will give advice on moving in this direction!
That's exactly what I was asking!!!
Good but everyone is not a C programmer except if you find one
useful wrote: Sun Jul 28, 2024 2:31 pm
Maybe starting with something simpler than Luajit.
Yes I recommend you to start with PB to interface for Lua, it is more easy than to rewrite or adapt in C backend with PB.
useful wrote: Sun Jul 28, 2024 2:31 pm
p.s. I have placed it in this section intentionally as a wish for the development of the tool. So that we could combine pb & c in one project, given that gcc is included.
You could have said from the start your wish/feature request is to integrate the "lib" for gcc because pb+gcc+lua+jit is a personal project we're going to say that eh ... after that you will see that if Fred is ok or not about that

Re: Pb+C-backend+luajit
Posted: Sun Jul 28, 2024 5:09 pm
by useful
It was from the very beginning that I quoted from the luajit page that they stop publishing binary builds.
And I asked the question: why should I install another c compiler if, after installing the purebasic, I already have one.

Re: Pb+C-backend+luajit
Posted: Tue Jul 30, 2024 12:05 am
by fsw
As was said, PureBasic does not install a full version of the gcc compiler, it only brings some gcc stuff with it to make the PureBasic compiler work.
No more, no less.
It might be that in order to compile lua/lua-jit you might need gcc stuff that PureBasic doesn't carry along, which in this case you have to install a full version of the gcc compiler anyhow.