Compile a Linux app with Windows Blitzmax

Archives Forums/Linux Discussion/Compile a Linux app with Windows Blitzmax

TaskMaster(Posted 2007) [#1]
How exactly would I create a Linux app with my Windows version of BlitzMax, or is it even possible?

I just installed the latest Ubuntu on a PC and wanted to try running my game on it.

Thanks for nay help.


insomnia(Posted 2007) [#2]
Just download the Linux version of BlitzMax and compile your code with the help of it.
Just click on Account -> Product updates and get a copy of Linux BMax.

Alternativly, if you do not want to install Linux - nevermind, as you already did - you could use a virtual machine runing Linux on your Windowsdesktop...


TaskMaster(Posted 2007) [#3]
Got it. Thanks.

I guess I could have searched :(

Installing g++-3.3 now :)


TaskMaster(Posted 2007) [#4]
Dang, now I have another problem.

I am getting this:

/usr/bin/ld: cannot find -|X11
collect2: ld returned 1 exit status

I am running a fresh install of Ubuntu 7.04.

Thanks for nay help.


Brucey(Posted 2007) [#5]
You might find the sticky post on the Linux forums useful too - about getting everything you need installed.


TaskMaster(Posted 2007) [#6]
Oh crap, didn't realize I needed more than just g++.

Thanks. I'm on it now! :)


TaskMaster(Posted 2007) [#7]
OK, whew! Got all of that done. Thanks.

Finally got my game to compile. Now, when I play it, I get no sound.

The individual sound files play when I dbl click them in the file browser. Any idea why they wouldn't play in my game under Linux? The same game makes sound under Windows. I did install libasound2 (or something like that as the instructions said).


TaskMaster(Posted 2007) [#8]
Also, there is no sound when I compile and run any of the samples that come with BlitzMax.


TaskMaster(Posted 2007) [#9]
After some looking around here, I determined that BlitzMax uses OSS.

Then when I went Google hunting and found a post somewhere that said Firefox locks up OSS. Maybe the flash plugin causing it. So, I shut down Firefox and sure enough, sound came from my Blitzmax apps.

So it seems that Firefox (or the flash plugin possibly) is doing something it shouldn't be and locking the sound driver.


Craig Watson(Posted 2007) [#10]
OSS is not well designed for sharing. It's quite likely Firefox and Flash specifically have locked the default /dev/dsp that Blitz wants to use.

Try the following for a fix:

Open a terminal and type the following
sudo aptitude install alsa-oss

You could also search for alsa-oss in Synaptic.

Then make sure Firefox is closed and enter the following from a terminal
gksudo gedit /etc/firefox/firefoxrc

Look for "FIREFOX_DSP" (it should be FIREFOX_DSP=”none”) change it for
FIREFOX_DSP=”aoss”

Save the file and restart Firefox.

This should stop Firefox from hogging /dev/dsp, but won't stop other OSS apps from doing the same.

The best way to have sound playing simultaneously is to use ALSA, because even if you don't have a card that can play multiple streams at once, it has a software mixer.


computercoder(Posted 2007) [#11]
Serve the people Craig!

@TaskMaster: Yep... OSS is flakey with multiple sound files trying to access it. I had a time with sound and Linspire (somewhat related) and it finally worked with tweakage through alsa.


Craig Watson(Posted 2007) [#12]
Just thinking the other possibility is that you have an onboard soundchip and an add-on sound card. In my case I have an Audigy 2 and Ubuntu detects the motherboard's Via sound chip as well. Let me know if you're in this situation and I'll help you fix it.


TaskMaster(Posted 2007) [#13]
I have onboard sound, but not an add-in card. Thanks for the offer.

I have decided to keep my Ubuntu install for compiling my apps for Linux for distribution, but I am going back to XP for my daily machine. I have gotten use to the BLIde interface for writing my BlitzMax software, can't go back to using the original IDE, it just doesn't compare.

Thanks for all of the help. Linux keeps getting a little closer and closer to being a complete replacement for M$ Windows, but I am tied to a few Windows apps that my office uses and they do not run well/at all in wine/cx.