Does it work on Linux?

Community Forums/Monkey Talk/Does it work on Linux?

Captain Wicker (crazy hillbilly)(Posted 2013) [#1]
is monkey compatible with linux?

thanks!


dawlane(Posted 2013) [#2]
Well it works on the 32bit version of Linux once you get every thing set up.
As for the stability I wouldn't know just yet because there is an issue with the GLFW target and what looks to be a problem with newer propriety drivers.

The Linux version supports...
C++ Console Target
ANDROID
HTLM
GLFW
FLASH

It should be noted that adobe will no longer releasing major versions flash player so 11.2 is the last one, but they will be suplying security backports for it )


*(Posted 2013) [#3]
It works brilliantly on Ubuntu Linux 12.10 32-bit I use it all the time


dawlane(Posted 2013) [#4]
@EdzUp: What GFX driver and version are you currently using?
The GLFW problem looks like it has more to the way in which the GLFW target code is used.
If I modify the Linux makefile by not building the glfw objects but linking to the libglfw, then it works. The other way is to get the full glfw source code and build it from scratch.


*(Posted 2013) [#5]

@EdzUp: What GFX driver and version are you currently using?


im on a Asus EeePC 701SD (Intel GMA900) the drivers im using are the default linux ones that come with Ubuntu 12.10 :)


dawlane(Posted 2013) [#6]
Well tried it with Ubuntu 12.04 64bit under VMWare and tested only the GLFW target so far. Install is similar to that of BlitzMax on 64bit if you intend to do 32bit binaries, but make sure that you have the OpenGL+GLFW_OpenAL development files installed.
To use the default ide that comes with it you have to install the 32bit libs (maybe just the QT stuff), but it should be possible to rebuild the ide and trans as 64bit applications with a little work.


Ringo(Posted 2013) [#7]
.


GaryV(Posted 2013) [#8]
Why would a new product be limited to 32-bit? It is irrational for it not to be compiling for 64-bit.


dawlane(Posted 2013) [#9]
@GaryV: It's a question that should really be aimed at mark.
The tools in Monkey are all 32bit with maybe the exception of the latest versions of Monkey as I'm sure OS X 10.7-8 tools are native 64bit.
The source code it generates for desktops can be compiled to 32/64bit binaries on both Windows and Linux, but you have to mess around with the compiler project files directly if you want 32/64bit on Windows or OS X. While you would have to mess around with the libraries for Linux just like you would have to do to get BlitzMax running.
Another thing is the generated C++ source code will not be data type aware; meaning an int data type will compile to the size of the targets native size (32bit=4 bytes,64bit=8bytes). That would mean the two compiled versions of the same code would behave differently.


Wiebo(Posted 2013) [#10]
I've tried to get the glfw target compiling under Ubuntu 13.04. I'll be trying Monkey on Mint this weekend.


*(Posted 2013) [#11]
I always thought c++ datatypes were of a fixed size, short was 1 byte, int 2 bytes, long 4 bytes, long double 8 bytes, int64 8 bytes etc?


dawlane(Posted 2013) [#12]
@Wiebo:Be aware you may have to modify then makefile in the monkey templates to get glfw working. This Is what I had to do to get the GLFW target to work.

@EdzUp:Check out Variables. Data types over at www.cplusplus.com.
I was doing some code displaying numbers using monkeys float data type and noticed that of those numbers were different from that of a 32bit build.
The way to find out what the size of any data type in C/C++ is to use the sizeof() function.
You should be able to force the C/C++ compiler to build for 32bit with the -arch=i386 flag, but then you would need to have 32bit libraries as well. This is due to the incompatibility of pointer size.

Edit: It's been a long, long time since I did any thing with c/c++ and I remember reading a few articles about 32bit/64bit migration and there was a few talking about data types. So I just did a sizeof() in Mint 32/64bit c/c++ data types. Using GCC 4.0+
size of 64bit | 32bit
unsigned char 1 | 1
unsigned short 2 | 2
unsigned int 4 | 4
unsigned long 8 | 4
float 4 | 4
double 8 | 8
long double 16 | 12
size_t 8 | 4

Up to press I haven't seen any thing of type long * in the GLFW code.


D4NM4N(Posted 2013) [#13]
Yes. I have used JEdit as an ide running the compiler under wine. It works usably.


Wiebo(Posted 2013) [#14]
@dawlane: Thanks for that. I might need it :)


GaryV(Posted 2013) [#15]
One thing not clear to me, is there a Linux IDE for Monkey?


therevills(Posted 2013) [#16]
is there a Linux IDE for Monkey?

Last time I checked Ted worked in Linux.


GaryV(Posted 2013) [#17]
Ahh, so doesn't ship with one.

One more question (again I am not clear on this). If I bought Monkey, I can work on Linux and compile for Linux and would not need to use Windows or WINE?


therevills(Posted 2013) [#18]
Ted comes with Monkey, its the default IDE for the language.

If I bought Monkey, I can work on Linux and compile for Linux and would not need to use Windows or WINE?


I've only tested the HTML5 target, but I "guess" you would not need to use Windows or WINE (but of course the compiled "exe" wouldn't work on Windows).


*(Posted 2013) [#19]
The Linux ide is exactly the same as all the other platforms, compiling for Linux is also don't in the same way and as Linux has gnu c++ its quite easy to make Linux exe's :)

i use it all the time to test and write code on and if it works on my aging asus eeepc 701sd using Ubuntu 13.04 then it should work on anything :(


dawlane(Posted 2013) [#20]
The Monkey IDE is built with QT and as the source is provided it can be built on any platform that QT works on.
Monkey Linux works just like it's Windows and Mac equivalents in every way with the obvious exception of building glfw/c++ a cross desktop platforms and iOS. But if you own a Windows or Mac PC then it's not a problem.

@therevills: It should be possible to set Monkey up to cross compile using the Linux MINGW package.