Page 1 of 1
Lua lib that works on the Mac
Posted: Sun Jul 24, 2016 3:02 pm
by DoubleDutch
Does anyone have a link to a Mac Lua 5.1.4 or 5.1.5 lib that works with PureBasic (32-bit) and this include file:
http://www.purebasic.fr/english/viewtop ... 6&start=30
Re: Lua lib that works on the Mac
Posted: Sun Jul 24, 2016 3:19 pm
by wilbert
I never used Lua but are the pre built binaries not working ?
http://luabinaries.sourceforge.net/download.html
Re: Lua lib that works on the Mac
Posted: Sun Jul 24, 2016 7:49 pm
by DoubleDutch
No, they fail at the link stage with then being x86-x64 and the code being i386 (or the other way around) apparently - even though its the same thing.
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 5:58 am
by wilbert
I'm sorry I don't have an answer for your problem in that case but is there any reason for using the 32 bit version of PureBasic on OSX ?
OSX isn't Windows. Since OSX 10.7 there is no 32 bit version of the OS anymore.
The oldest OSX version PureBasic currently supports (10.6) did come in both a 32 and 64 bit version but even the 32 bit version is capable of running 64 bit applications.
The only Intel Macs which aren't capable of running 64 bit software are some of the models released in 2006 that had a 32 bit CPU.
You can of course still run (and develop) 32 bit software but new OS features are often only available in 64 bit mode and if you want to submit an application to the Mac App Store, you must provide 64 bit support.
Besides Apple itself also other large companies dropped 32 bit OSX support. Adobe for example with Photoshop CS6 (Released May 2012) which is 64 bit only.
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 7:15 am
by jack
it looks to me that LuaBinaries only provides 64-bit libs for os x, don't know if the lib would build without problems, am too busy at the moment to try.
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 10:05 am
by DoubleDutch
@Wilbert My app needs to run on Macs from Snow Leopard to now, including both 32 and 64 bit versions of the OS - as 32 bit programs work on both then that seems to be the best choice.
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 10:18 am
by jack
hello DoubleDutch
from the lua website
but before you issue the command
make macosx change the makefile that's in lua-5.1.5/src/
change CFLAGS= -O2 -Wall $(MYCFLAGS) to CFLAGS= -m32 -O2 -Wall $(MYCFLAGS)
then do
make macosx
the library will be built to 32-bit but you will receive errors at the end of compile due to makefile trying to build a 64-bit test program using a 32-bit lib
I think you can ignore the errors
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 10:26 am
by wilbert
DoubleDutch wrote:@Wilbert My app needs to run on Macs from Snow Leopard to now, including both 32 and 64 bit versions of the OS - as 32 bit programs work on both then that seems to be the best choice.
Snow Leopard 32 bit can also run 64 bit applications if the CPU supports 64 bit.
Only if you really need it to run on all Intel Macs ever produced, you need a 32 bit version.
The pre-build files do include a 32 bit Lua (5.1.4) version build for OSX 10.5 Leopard.
https://sourceforge.net/projects/luabin ... z/download
Maybe that one will work.
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 10:39 am
by jack
@DoubleDutch
I successfully run the your test program using the lib built as described above, only had to modify the pbi file with the correct lib name
Re: Lua lib that works on the Mac
Posted: Mon Jul 25, 2016 2:50 pm
by DoubleDutch
Thanks, that worked.
