Compile for Linux on Windows?

BlitzMax Forums/BlitzMax Programming/Compile for Linux on Windows?

JoshK(Posted 2007) [#1]
Is there any way to do this? If not, what is the recommended version of Linux and where do I download it?


Otus(Posted 2007) [#2]
Haven't tried it, but since you can run Damn Small Linux from within Windows it is possible in theory. DSL probably needs a lot work before you can run BlitzMax on it, as it doesn't include that many libraries on default.

There are instructions on using BlitzMax with Ubuntu in the Linux forum, so I suggest that if DSL doesn't work.

DSL from www.damnsmalllinux.org
Ubuntu from www.ubuntu.org


N(Posted 2007) [#3]
I'll give you the simple answer and say no, it's not possible. There are ways to do it, but for all intents and purposes you won't be able to and if I told you how you wouldn't want to. If you want an easy to install copy of Linux, get Mandriva or Ubuntu. I've had no luck installing Mandriva for some reason these days, so I'm in favor of Ubuntu.


Picklesworth(Posted 2007) [#4]
Actually, Ubuntu is from www.ubuntu.com
As for compiling under Windows... you wouldn't want to. You don't need a full Linux install, though. Distributions like Ubuntu come on live CDs, which provide the full functionality of the desktop running off a CD with a RAM disk.


BlitzSupport(Posted 2007) [#5]
VMWare Server is free and you should be able to download the Ubuntu 7.04 CD ISO and install it on Windows (ie. in VMWare). It won't run OpenGL stuff well, but will let you compile exes at least, if that's all you want to do.


grable(Posted 2007) [#6]
You could also try VirtualBox, another free one.
Im running linux + blitzmax with no problems =)


Otus(Posted 2007) [#7]
Has anyone actually had luck in running BlitzMax, and compiling from Live CD Linux? There are some libraries that one needs to install first, and I'm just wondering, whether it is possible to install them while running a live cd linux.


Dreamora(Posted 2007) [#8]
yes it is, if you have 2GB RAM and give the live image 1.5GB for its stuff.


FlameDuck(Posted 2007) [#9]
MinGW is not a cross compiler, so the short answer is no. GCC however can be compiled to be a cross compiler, and with slight changes to bmk, and the Windows version of bcc (which runs under Wine) it is possible to compile for Windows (and MacOSX) from Linux.

As for which Linux distro to get, I'm leaning towards Ubuntu as well. It's the "supported" BRL distro, and is very popular (so googling for solutions to potential problems is going to be easier).


JoshK(Posted 2007) [#10]
No wonder no one uses Linux.


Picklesworth(Posted 2007) [#11]
No wonder no one uses Linux.
Eh? Why's that?
It's really quite nice for BlitzMax, once you get around the initial quirks (case matters!) and the Linux IDE being awful. It is more trouble installing Mingw on Windows than it is on Ubuntu going to the terminal once and typing
sudo apt-get install libstdc++5 g++-3.3 libasound2-dev libglu1-mesa-dev x11proto-core-dev x11proto-gl-dev x11proto-kb-dev libxxf86vm-dev
...Boom! Working BlitzMax with the power to compile modules.

Since everything here has been positive, I'll assume that you have been overwhelmed by the many choices. If this is true, I suggest you stick with the easiest solution (desktop live CD, 2 clicks on the Ubuntu web site, 3 clicks for Mandriva) and add the complicated stuff (VM) to it if you really want.
I chose Ubuntu because it happened to give me the fastest download, and it hasn't failed me so far.

If you do go for Ubuntu, by the way, and you decide to install it to a hard drive, there is a place in the installer (the confirmation screen, I believe) where you can choose where it will put the boot loader (GRUB). Make sure to change whatever it says to (fd0), and put a floppy disk in. That way you will only be bothered with the bootloader if you insert that floppy disk, and if you have the floppy disk out the OS will be 100% invisible.


JoshK(Posted 2007) [#12]
I ran Ubuntu off the CD. Wow, that was a horrible experience. It reminded me of the old Dark Basic full-screen IDE. I couldn't figure out how to do anything.

I tried extracting the .gz and it gave me some error about permission. I finally extracted it, then tried to run it and it gave me an error about gcc or something.


Picklesworth(Posted 2007) [#13]
Hehe, sounds ugly.

For the error about gcc, you will need to run that command I gave you.

And before you say "Bah! Command line!", I will also give you the alternative GUI directions ;)

-System->Administration->Synaptic Package Manager. (Via the menu at the top left in the default setup).
-Hit Search on the toolbar, make sure it is only searching by Name, type "libstdc++5" and Search.
-Right click the listed package, choose Install. (Or click its check box).
-Do the same procedure, searching for each of those listed packages and choosing to install them.
-You may also want the package "build-essential".
-Press "Apply".
-Wait...
-Run the IDE. Yay!