Pb+C-backend+luajit

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
useful
Enthusiast
Enthusiast
Posts: 402
Joined: Fri Jul 19, 2013 7:36 am

Pb+C-backend+luajit

Post 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.
Dawn will come inevitably.
User_Russian
Addict
Addict
Posts: 1520
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Pb+C-backend+luajit

Post 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.
User avatar
useful
Enthusiast
Enthusiast
Posts: 402
Joined: Fri Jul 19, 2013 7:36 am

Re: Pb+C-backend+luajit

Post 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.
Dawn will come inevitably.
threedslider
Enthusiast
Enthusiast
Posts: 380
Joined: Sat Feb 12, 2022 7:15 pm

Re: Pb+C-backend+luajit

Post by threedslider »

See here if there is an useful for you : https://github.com/Dadido3/Lua-PureBasic

Good luck.
User avatar
useful
Enthusiast
Enthusiast
Posts: 402
Joined: Fri Jul 19, 2013 7:36 am

Re: Pb+C-backend+luajit

Post 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.
Dawn will come inevitably.
threedslider
Enthusiast
Enthusiast
Posts: 380
Joined: Sat Feb 12, 2022 7:15 pm

Re: Pb+C-backend+luajit

Post 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... :?
User avatar
useful
Enthusiast
Enthusiast
Posts: 402
Joined: Fri Jul 19, 2013 7:36 am

Re: Pb+C-backend+luajit

Post 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.
Dawn will come inevitably.
threedslider
Enthusiast
Enthusiast
Posts: 380
Joined: Sat Feb 12, 2022 7:15 pm

Re: Pb+C-backend+luajit

Post 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 :mrgreen:
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 :wink:
User avatar
useful
Enthusiast
Enthusiast
Posts: 402
Joined: Fri Jul 19, 2013 7:36 am

Re: Pb+C-backend+luajit

Post 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. :)
Dawn will come inevitably.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Pb+C-backend+luajit

Post 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.

I am to provide the public with beneficial shocks.
Alfred Hitshock
Post Reply