Anyone tried to compile GLFW for Linux?
Monkey Targets Forums/Desktop/Anyone tried to compile GLFW for Linux?
| ||
I would like to add support for Linux in my games. I tried to compile it on my old Ubuntu machine. g++ Main.cpp -o MonkeyGame -lGL -lopenal -lglfw but it wouldn't compile. Any tips? Update: I don't think anyone is interested but I will do this anyway. I got it to compile but the main issues is with the STB_IMAGE file which is causing issues preventing the app to run or compile. I found a cocos side project that uses STB_IMAGE with GLFW and it works for him. I just need to figure it out. I wonder why monkey does not support Linux target!!? Diddy's LaunchBrowser and LaunchEmail should be removed or fixed in order for this to work. My file stream functions caused some issues and had to remove them. |
| ||
I am interested and so are others; http://www.monkeycoder.co.nz/Community/posts.php?topic=1956 . I think it's important to support this as target... |
| ||
Do we actually have permission to make it all working on Linux and distribute it here? Any chance it'll get into the 'next version' if we do? |
| ||
has the IDE been ported to Linux? |
| ||
No, but it would be interesting to have the code compile on Linux; the IDE is secondary. If the compiler works, it wouldn't be too hard to work with emacs or vim. |
| ||
This would be really interesting. Most of my work is done under linux. But for monkey I still have to boot windows.. |
| ||
@frank I don't think there would be a problem with adding support for Linux. And if it works fine, I think that it could be added to the next version. This is a very good collaborated community. You should worry about getting it to work first. @mardrag and @slenkar IDE is not an issue since you can use any text editor. Personally, I don't like Monk and would prefer gedit with few customization to properly syntax highlight Monkey Code and compile it. To actually compile the code, you will have to use the trans tool http://blitz-wiki.appspot.com/Trans I never tried this but I think it should work unless if trans does not work with Linux which will be extremely strange. |
| ||
Back then when I was on Linux I wrote a monkey language file for gedit. Gedit is a lot like Textmate and with some plugins really a great text editor. Monkey Lang File + some useful plugins like completition http://dl.dropbox.com/u/2892658/forum/monkey_gedit.zip (monkey lang file not up to date) |
| ||
to compile trans for linux you need trans for linux :) ? |
| ||
Hello, I successfully ported "trans" on Linux and also the GLFW target. :-) Mark, if you want, I can send you my patches against Monkey Pro 56b. Please, let me know. |
| ||
Cool. Would you mind posting them here? |
| ||
Yea I'd love to try it out... will this work with RaspberryPi? |
| ||
The process is a bit complicated now. I could create some patch files against v56 but you have to modify your original files. I only touched in src/trans and some lines in the glfw target. I am waiting for the next version of Monkey to make a patch that will last a bit longer :-) Considering the small amount of time it took me to port GLFW to Linux I am wondering why it is taking so much for Mark to release Monkey for Linux... |
| ||
I guess that is due to the lack of demand :) There are people asking for it and a patch that is ready to implement. I think that will encourage Mark to add support for Linux. |
| ||
For anyone interested, I have created a patch file that patches all Monkey 56b to work with Linux. You can find it here: http://fabio.rotondo.it/monkey.linux.patch.gz If you are not able to apply the patch file, it should be easy to patch the file by hand because all the modifications are just 111 lines of patch file (including blank lines) Hope it helps :-) |
| ||
Cool, thanks... have you tried emailing Mark, BTW? He may not have seen these posts. |
| ||
Hi James, actually I have not contacted Mark for this patch / project. I have always had luck contacting Mark through this forum, so I didn't ever consider mailing him directly... also because I don't have his email :-) Anyway, I think that Mark is quite busy these days, expecially considering the release rate he always keeps with Monkey (he is a bit out of time now ... I was expecting a new release last week ;-) ). Also, maybe like Aman says, there is just luck of demand for a Linux version :-) |
| ||
Great, thank you so much. |
| ||
I don't mean to sound stupid, but how do i apply the patch file? I've tried it from within the MonkeyPro folder, outside of it , and everywhere in between. Any tips?traceydecker82@main-desktop:~/Downloads$ patch -u ./MonkeyPro56b monkey.linux.patch The next patch would create the file ./MonkeyPro56b, which already exists! Assume -R? [n] n Apply anyway? [n] y patch: **** File ./MonkeyPro56b is not a regular file -- can't patch |
| ||
Hi jondecker76, these are all the steps to follow in order to apply the patch: 0 - Download MonkeyPro 56b original zip file 1 - Download my file from http://fabio.rotondo.it/monkey.linux.patch.gz 2 - Open Monkey archive 3 - Extract my patch with gunzip monkey.linux.patch.gz 4 - enter the Monkey dir and type patch -p1 -i (path of the patch file)/monkey.linux.patch You should now have a Monkey patched :-) Then you need to go inside src/trans and build trans_linux with the following command: trans_linux -target=stdcpp -config=release trans.monkey (this implies you already have a working trans_linux on your system...) Hope it helps! |
| ||
Thanks a lot. I have a few posts already on some of these subjects, but please check them out as it sounds like you can help. I have Monk running under Linux right now, and MServer as well. |
| ||
Ok, I have the sources patched, but in trying to build the new trans_linux I error out (I do have the trans_linux binary installed)traceydecker82@main-desktop:~/Downloads/MonkeyPro56b/src/trans$ ../../bin/trans_linux -target=stdcpp -config=release trans.monkey TRANS monkey compiler V1.17 Parsing... /home/traceydecker82/Downloads/MonkeyPro56b/modules/monkey/list.monkey<333> : Error : Syntax error - expecting identifier. thanks again! |
| ||
hmmn it seems that you have a version of Monkey VERY old... I think Mark added reflection also in the Trans program at some point and this can cause compiling pribkems... |
| ||
hmmn it seems that you have a version of Monkey VERY old... looks like the version is up to date, 56b: /home/traceydecker82/Downloads/MonkeyPro56b/ |
| ||
I probably have to compile a more recent trans - I just downloaded binaries from this thread: http://www.monkeycoder.co.nz/Community/posts.php?topic=1480#13456 which looks like they were compiled from v44 - so I'm sure thats my issue. I'll recompile trans for linux in the morning after I get off work |
| ||
hmmn it seems that you have a version of Monkey VERY old... I think Mark added reflection also in the Trans program at some point and this can cause compiling problems... |
| ||
I wrote also a Vim file for syntax highlighting, if somebody is interested... ;-) |
| ||
The link http://fabio.rotondo.it/monkey.linux.patch.gz seems to be dead? Is there a place where I can download the patch? I'd really like to use the GLFW-target for Linux. |
| ||
I'm also wondering what's needed to get GLFW running on Linux. My Raspberry Pi is here, and, well... ! |
| ||
@mardrag sorry, I removed the patch some days ago, Now it is up again. |
| ||
@fsoft: Thanks! |
| ||
has anyone got mserver for linux built? I cant get blitzmax to run on linux |
| ||
I just got a http://openpandora.org/ and would really like to develop Monkey games on it. What would be needed to do that? |
| ||
Shouldnt be too difficult actually, just send me one through the mail and Ill get it working :). Compile trans for linux ARM... hmm maybe you could compile trans on the pandora itself?? (with GCC) You would have to use a different server other than Mserver cos blitzmax doesnt do ARM. The IDE is probably out of the question too. If you want to develop native apps for pandora you might want to edit the mojo file for a target that uses OpenGLES already. The C++ code for 'opening a window' and loading files for pandora would have to be added in if they are different to c++ linux commands. |
| ||
Compile trans for linux ARM... hmm maybe you could compile trans on the pandora itself?? (with GCC) => that should work, i'm going to try that anyway first :) Pandora is just a full Linux with OpenGL , so I would think there shouldn't be any problems besides MServer, but that's not a big deal anyway. |
| ||
I posted this to the wrong forum. I'm a bit late, but if you're still interested, check it out. I go through all the steps in detail on how to build the GLFW-target for linux. |