BlitzMax Linux dependencies

Archives Forums/Linux Discussion/BlitzMax Linux dependencies

skidracer(Posted 2010) [#1]
This is the latest script for easy install of all BlitzMax dependencies on most Linux systems.




degac(Posted 2010) [#2]
Reading this thread about distribuiting application I must ask: is there a way to create a 'script' to install what needed to run the application (I suppose the above script is targeted to development)?
I still have a doubt about the fact that a BlitzMax-linux application car run out-of-the-box...

Thanks


Brucey(Posted 2010) [#3]
I've built a package on Ubuntu, which seems to work - it knows what dependencies it needs.

But it's not so simple to set up everything - there are no proper utilities that "just work". There's always more stuff you need to do even with the utils that are out there.


degac(Posted 2010) [#4]
Thanks for the answers.
This week end I'll make some tests: I will compile some BlitzMax applications on Ubuntu 7.x (where I've installed the DEV libs) and I will test on another Ubuntu machine (probabily Ubuntu 10.4) just to see what happens.


Htbaa(Posted 2010) [#5]
Why do you stick with Ubuntu 7? It isn't supported anymore, already for quite a while now. At least upgrade to 8.04. I doubt your compiled version will work on 10.04 as both distributions have other versions when it comes to shared libraries. Most libraries will probably be backwards compatible, but if they're linked to a specific version it can become a little problematic.


degac(Posted 2010) [#6]
@Htbaa: perfect, so I can test from Ubuntu7 -> Ubuntu10 and vice-versa.
The goal is to see if there are errors, and if there could be a solution.


degac(Posted 2010) [#7]
Little OT (but not so much...)
Steam for Linux is coming
Be prepared could be an interesting solution for BlitzMax developers (remember the idea behind of Steam: look, choose, download and play. No time/worry to check dependancies or whatever...)


Blueapples(Posted 2010) [#8]
Yay for this script, got me around issues compiling the new MaxGUI :)


Armitage 1982(Posted 2010) [#9]
This script would be VERY usefull BUT:

install.sh: 38: Syntax error: "(" unexpected

What's wrong here ??

I DON'T like installing Blitzmax on Linux :)
It's not easy and clearly documented !

[EDIT]
Will work if you double clic this saved .sh file while setting all axx in properties.


degac(Posted 2010) [#10]
Just tested on Ubuntu10.10 (running on OracleVM).
The first thing: aptitude is not installed by default (I believe...) - I've used the Ubuntu Software Center to install it.

After the installation, everything works (BlitzMax 1.41 + MaxGUI)


degac(Posted 2010) [#11]
I decided to make a 'proper' installation of Ubuntu 10.10.
Same as above (I needed to install manually aptitude) and then the script works.
Another thing: audio problem.

On my system the audio works (there are installed PULSE and ALSA).
The AudioDriver() reports only FreeAudio, FreeAudio OpenSound System and NULL.

I installed libopenal1, libopenal1-dbg and libopenal1-dev to get OpenAL installed and use SetAudioDriver("OpenAL") to listen the sound effects.


skidracer(Posted 2011) [#12]
Can someone please look into modifying the script to detect apt-get not aptitude (aptitude is no longer included in Ubuntu distribution).


degac(Posted 2011) [#13]
I made a copy&paste of the first post's script, adding apt-get in the 'supported' package manager.
I added inst_apt-get() (with the same things for inst_aptitude()...)
I really dont' know if it works (because on my system I've already installed quite all... so the script tells me that the xxx version is already present and so on...)
It should works.
Sorry I cant' be more useful!

Cheers




Here a screenshot of the result

Blitzmax Installation Script version 0.7b
Please report bugs or suggestions to: jimteeuwen[at]gmail.com

[i] Checking architecture...
found: 32 bit
[i] Identifying package manager...
found: apt-get
[i] Performing apt-get setup...
[i] Building package list...
[i] Installing...
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
build-essential è già alla versione più recente.
g++ è già alla versione più recente.
gcc è già alla versione più recente.
libglu1-mesa-dev è già alla versione più recente.
libidn11-dev è già alla versione più recente.
libxft-dev è già alla versione più recente.
libxpm-dev è già alla versione più recente.
libxxf86vm-dev è già alla versione più recente.
x11proto-core-dev è già alla versione più recente.
x11proto-gl-dev è già alla versione più recente.
x11proto-kb-dev è già alla versione più recente.
x11proto-xext-dev è già alla versione più recente.
libasound2-dev è già alla versione più recente.
0 aggiornati, 0 installati, 0 da rimuovere e 120 non aggiornati.
[i] Done.




Last edited 2011


orgos(Posted 2011) [#14]
im run this code and the BlitzMax 1.41 + MaxIDE 2 CE works fine but its compile but not RUN... say that:

Building defender
Compiling:defender.bmx
flat assembler version 1.68 (32768 kilobytes memory)
6 passes, 0.3 seconds, 704367 bytes.
Linking:defender

Process complete

then i dont see the app...

salut


pmc(Posted 2011) [#15]
FYI for others.... I just installed and the IDE runs on Linux Mint 11 (64-bit) right out of the tarball. I couldn't get any of the samples to compile until I ran degac's updated script (above) which does an apt-get install for a whole tonload of missing packages. Everything works swimmingly.


markcw(Posted 2011) [#16]
So pmc confirms degacs apt-get fix works and it looks okay to me too, except the version history should be updated and version named 0.9, I might as well do that so here it is.



I'm on 10.4 lucid and it wasn't working (error message was something about not linking to g++) even after running the script (0.8b) but it suggested doing an apt-get update and that fixed it.


matt!(Posted 2011) [#17]
Thanks for this :)


Russell(Posted 2012) [#18]
So far, this script has worked for every distro of Linux I've tried it on, so why not include this as part of the Bmax distribution? (And for that matter, skid's pulseaudio driver has as well). Which brings me to this question:

Are there any distros of Linux that have sound with BMax right out of the box? If not, what distro does? (Since Ubuntu seems to be the most popular right now, it seems that making it Ubuntu compatible, sound-wise, would be the logical thing to do.)

Russell


seriouslee(Posted 2012) [#19]
Thanks for posting! I didn't use the script but did use the library list and works great! Thanks again.

Ubuntu 12:04
AMD Athlon64, 1.5GB RAM


Grisu(Posted 2012) [#20]
Could you please add the installation of libgnome2-0 to the script?

Without it the OpenURL command will send the following error message:
"sh: 1: gnome-open: not found"

Tested under Ubuntu 12.04 and 12.10.


Devlin(Posted 2013) [#21]
How can I get this to install for 64-bit correctly?

I figured that I needed to add some symlinks to make things work - but once I do that I get another error!




skidracer(Posted 2013) [#22]

How can I get this to install for 64-bit correctly?



64-bit what?


Captain Wicker (crazy hillbilly)(Posted 2013) [#23]
64-bit what?


after seeing his error, I assume he is talking about Ubuntu x64. I am having this problem on the 32-bit version of Ubuntu 13.04. Cannot compile anything. Me thinks Bmax needs updating..


Tricky(Posted 2013) [#24]
Any ideas to fix this?

Blitzmax Installation Script version 0.7b
Please report bugs or suggestions to: jimteeuwen[at]gmail.com

[i] Checking architecture...
    found: 64 bit
[i] Identifying package manager...
    found: aptitude
[i] Performing aptitude setup...
[i] Building package list...
[i] Installing...
[sudo] password for rachel: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
x11proto-core-dev is already the newest version.
x11proto-kb-dev is already the newest version.
The following extra packages will be installed:
  g++ g++-4.6 g++-4.6-multilib gcc-4.6-multilib lib32gomp1 lib32quadmath0 lib32stdc++6 libc6-dev-i386 libdrm-dev libexpat1-dev libfontconfig1-dev
  libfreetype6-dev libgl1-mesa-dev libkms1 libstdc++6-4.6-dev libxext-dev libxrender-dev mesa-common-dev x11proto-render-dev x11proto-xf86vidmode-dev
  zlib1g-dev
Suggested packages:
  gcc-4.6-doc libstdc++6-4.6-dbg lib32stdc++6-4.6-dbg lib32mudflap0 libasound2-doc libstdc++6-4.6-doc
The following NEW packages will be installed:
  g++ g++-4.6 g++-4.6-multilib g++-multilib gcc-4.6-multilib gcc-multilib lib32gomp1 lib32quadmath0 lib32stdc++6 libasound2-dev libc6-dev-i386 libdrm-dev
  libexpat1-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libidn11-dev libkms1 libstdc++6-4.6-dev libxext-dev libxft-dev
  libxpm-dev libxrender-dev libxxf86vm-dev mesa-common-dev x11proto-gl-dev x11proto-render-dev x11proto-xext-dev x11proto-xf86vidmode-dev zlib1g-dev
0 upgraded, 31 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.1 MB of archives.
After this operation, 55.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev-i386 amd64 2.15-0ubuntu10.3
  404  Not Found [IP: 91.189.91.14 80]
Get:1 http://archive.ubuntu.com/ubuntu/ precise/main lib32gomp1 amd64 4.6.3-1ubuntu5 [28.2 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ precise/main lib32quadmath0 amd64 4.6.3-1ubuntu5 [195 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ precise/main gcc-4.6-multilib amd64 4.6.3-1ubuntu5 [2534 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ precise/main gcc-multilib amd64 4:4.6.3-1ubuntu5 [1154 B]
Get:5 http://archive.ubuntu.com/ubuntu/ precise/main libkms1 amd64 2.4.32-1ubuntu1 [9098 B]
Get:6 http://archive.ubuntu.com/ubuntu/ precise/main libstdc++6-4.6-dev amd64 4.6.3-1ubuntu5 [1660 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ precise/main g++-4.6 amd64 4.6.3-1ubuntu5 [6954 kB]                                                                 
Get:8 http://archive.ubuntu.com/ubuntu/ precise/main g++ amd64 4:4.6.3-1ubuntu5 [1442 B]                                                                    
Get:9 http://archive.ubuntu.com/ubuntu/ precise/main lib32stdc++6 amd64 4.6.3-1ubuntu5 [333 kB]                                                             
Get:10 http://archive.ubuntu.com/ubuntu/ precise/main g++-4.6-multilib amd64 4.6.3-1ubuntu5 [1015 kB]                                                       
Get:11 http://archive.ubuntu.com/ubuntu/ precise/main g++-multilib amd64 4:4.6.3-1ubuntu5 [874 B]                                                           
Err http://archive.ubuntu.com/ubuntu/ precise-updates/main libasound2-dev amd64 1.0.25-1ubuntu10.1                                                          
  404  Not Found [IP: 91.189.91.14 80]
Get:12 http://archive.ubuntu.com/ubuntu/ precise/main libdrm-dev amd64 2.4.32-1ubuntu1 [182 kB]                                                             
Get:13 http://archive.ubuntu.com/ubuntu/ precise-updates/main libexpat1-dev amd64 2.0.1-7.2ubuntu1.1 [216 kB]                                               
Get:14 http://archive.ubuntu.com/ubuntu/ precise/main zlib1g-dev amd64 1:1.2.3.4.dfsg-3ubuntu4 [165 kB]                                                     
Get:15 http://archive.ubuntu.com/ubuntu/ precise/main libfreetype6-dev amd64 2.4.8-1ubuntu2 [794 kB]                                                        
Get:16 http://archive.ubuntu.com/ubuntu/ precise-updates/main libfontconfig1-dev amd64 2.8.0-3ubuntu9.1 [661 kB]                                            
Err http://archive.ubuntu.com/ubuntu/ precise-updates/main mesa-common-dev amd64 8.0.4-0ubuntu0.2                                                           
  404  Not Found [IP: 91.189.91.14 80]
Get:17 http://archive.ubuntu.com/ubuntu/ precise/main x11proto-xext-dev all 7.2.0-3 [253 kB]                                                                
Err http://security.ubuntu.com/ubuntu/ precise-security/main mesa-common-dev amd64 8.0.4-0ubuntu0.2                                                         
  404  Not Found [IP: 91.189.92.190 80]
Get:18 http://archive.ubuntu.com/ubuntu/ precise/main libxext-dev amd64 2:1.3.0-3build1 [159 kB]                                                            
Err http://archive.ubuntu.com/ubuntu/ precise-updates/main libgl1-mesa-dev amd64 8.0.4-0ubuntu0.2                                                           
  404  Not Found [IP: 91.189.91.14 80]
Get:19 http://archive.ubuntu.com/ubuntu/ precise/main libidn11-dev amd64 1.23-2 [636 kB]                                                                    
Err http://security.ubuntu.com/ubuntu/ precise-security/main libgl1-mesa-dev amd64 8.0.4-0ubuntu0.2                                                         
  404  Not Found [IP: 91.189.92.190 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libglu1-mesa-dev amd64 8.0.4-0ubuntu0.2                                                        
  404  Not Found [IP: 91.189.92.190 80]
Get:20 http://archive.ubuntu.com/ubuntu/ precise/main x11proto-render-dev all 2:0.11.1-2 [20.1 kB]                                                          
Get:21 http://archive.ubuntu.com/ubuntu/ precise/main libxrender-dev amd64 1:0.9.6-2build1 [27.5 kB]                                                        
Get:22 http://archive.ubuntu.com/ubuntu/ precise/main libxft-dev amd64 2.2.0-3ubuntu2 [55.0 kB]                                                             
Get:23 http://archive.ubuntu.com/ubuntu/ precise/main libxpm-dev amd64 1:3.5.9-4 [96.6 kB]                                                                  
Get:24 http://archive.ubuntu.com/ubuntu/ precise/main x11proto-xf86vidmode-dev all 2.3.1-2 [6116 B]                                                         
Get:25 http://archive.ubuntu.com/ubuntu/ precise/main libxxf86vm-dev amd64 1:1.1.1-2build1 [14.6 kB]                                                        
Get:26 http://archive.ubuntu.com/ubuntu/ precise/main x11proto-gl-dev all 1.4.14-2 [21.8 kB]                                                                
Fetched 16.0 MB in 21s (733 kB/s)                                                                                                                           
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/e/eglibc/libc6-dev-i386_2.15-0ubuntu10.3_amd64.deb  404  Not Found [IP: 91.189.91.14 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2-dev_1.0.25-1ubuntu10.1_amd64.deb  404  Not Found [IP: 91.189.91.14 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mesa/mesa-common-dev_8.0.4-0ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.92.190 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dev_8.0.4-0ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.92.190 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mesa/libglu1-mesa-dev_8.0.4-0ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.92.190 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[i] Done.
rachel@rachel-mint ~/Apps/BlitzMax/dependencies $ cd ..
rachel@rachel-mint ~/Apps/BlitzMax $ cd bin
rachel@rachel-mint ~/Apps/BlitzMax/bin $ ./bmk makemods
./bmk: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
rachel@rachel-mint ~/Apps/BlitzMax/bin $ 


(Side note: I used this script before on a VM without any trouble. Now I use this on a 'real' Linux PC and this happens).


Tricky(Posted 2013) [#25]
Supplement to my previous message:
After examining the script I installed all deps one-by-one manually.
Two were not installed for some reason:

= libglu1-mesa-dev
= libasound2-dev

I tried to get the packages manually over the net. libglu was not yet tried by libasound came with the next error:

Error: Dependency is not satisfiable: libasound2 (= 1.0.27.1-1)

Well, that tells me a lot..... NOT.....
Maybe you can make something out of it....


===== EDIT =====
Now to make things even crazier...
BMax claims not to be able to find 'libstdc++.so.6'
It actually DOES exist on my computer so I found out after using the search feature....
'/usr/lib/x86_64-linux-gnu/libstdc++.so.6' to be precisely....
Wrong location? Where do I need to put it then?????


===== EDIT ONCE MORE =====
I now ran "apt-get update" first and then I ran the script again.... And after that I made bmk rebuild all modules and .... IT WORKS NOW..... Woohooo ;)


Derron(Posted 2013) [#26]

'/usr/lib/x86_64-linux-gnu/libstdc++.so.6' to be precisely....



Yeah, Blitzmax wants the i386-version.

Let's see what my terminal seems to know:
$ locate libstdc++.so
/usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.so
/usr/lib/gcc/x86_64-linux-gnu/4.6/32/libstdc++.so
/usr/lib/i386-linux-gnu/libstdc++.so.5
/usr/lib/i386-linux-gnu/libstdc++.so.5.0.7
/usr/lib/i386-linux-gnu/libstdc++.so.6
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.18
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18
/usr/lib32/libstdc++.so.6
/usr/lib32/libstdc++.so.6.0.18


You see, I have different versions installed (see the version string after ".so."). Most times BlitzMax wants a normal ".so" file. These files won't "exist" at all, they are just symbolic links to a specific version (eg. 5.0.7). So if you do not specify a version, they will use the one "you" defined as main version. Ah... and "so.6" is also just a symbolic link to "6.0.18" - because a program would have to get recompiled each time the minor version changes. If you link to *.so.6 you know: I get major version 6.x.x which should be compatible to my needs.


bye
Ron


JoshK(Posted 2013) [#27]
install.sh: 38: Syntax error: "(" unexpected

I am experiencing this same error on Ubuntu 12.04 64-bit.


Darkseid2.0(Posted 2016) [#28]
I'm not sure if I'm missing anything but I get this message


and I did install all the dependencies. What am I missing?


Brucey(Posted 2016) [#29]
Open mod/pub.mod/lua.mod/lua.bmx

and add
?linux
Import "-ldl"
?

somewhere after the moduleinfo section.

build modules, and then your app. It should be okay.


Darkseid2.0(Posted 2016) [#30]
Nope, still doesn't work. and beside my mod path doesn't look like that. I have BlitzMax Version 1.50 What am I missing here.


Derron(Posted 2016) [#31]
Brucey talked about:
mod/pub.mod/lua.mod/lua.bmx


But as your error states, another module is imported without knowing about libdl

Open: /home/cobus/BlitzMax/mod/maxgui.mod/fltkmaxgui.mod/fltkmaxgui.bmx

Search
Strict

Import pub.zlib
Import pub.libpng


and adjust to
Strict

Import pub.zlib
Import pub.libpng
?linux
Import "-ldl"
?


Maybe that helps.


bye
Ron


Brucey(Posted 2016) [#32]
Oops. Updated the path :-)


RustyKristi(Posted 2016) [#33]
I just installed my first Linux version and I think we both got the same error with fltk. Here's the thread: http://www.blitzbasic.com/Community/posts.php?topic=106138#1303760

managed to find the solution on older posts :)


Brucey(Posted 2016) [#34]
fltk *is* a bit rubbish though.
But it probably depends on your user expectations on Linux ;-)


RustyKristi(Posted 2016) [#35]
I did notice, are there better alternatives Brucey?

I just remembered when linking, it asked for pangox and more gtk dev libraries


Brucey(Posted 2016) [#36]
There's GtkMaxGUI as part of https://github.com/maxmods/bah.mod
And a choice of 3 webview backends - depending on what libraries you want to link into your app.


RustyKristi(Posted 2016) [#37]
Btw, you'll happen to notice that we use fltk simply because we're just trying out the examples in maxgui folder or at least, in my case. ;-)


RustyKristi(Posted 2016) [#38]
I did use Bah.gtkmaxgui on my next try and I got some link errors about pixbuf. So I got the dev libraries and did this extra import to make it work.

Import Bah.gtkmaxgui
Import "-lgdk_pixbuf-2.0"



with Import Maxgui.Drivers it was straightforward but really slow (I'm using emulation), I was wondering why the below is the case for Linux, as seen in those examples

?Not Linux
Import Maxgui.Drivers
?



Brucey(Posted 2016) [#39]
That import is already there. (in gtkcommon.bmx, line 48)

Maxgui.Drivers auto-imports fltkgui. Not useful if you want to use something else - like gtkmaxgui.

Generally, I would use Framework, and import all my required modules. (this way you don't get *all* pub and brl modules, most of which you may not even be using in your app).

Current version of gtkmaxgui is 1.23. It uses GTK2.
I have been considering migrating to GTK3 (or at least, creating a new version)


RustyKristi(Posted 2016) [#40]
Sounds great. I'm not that familiar with frameworks and imports yet, can you give an example on how to do this properly, say the glcube sample or something that has the EVENT_GADGETPAINT in it?

'Simple GL cube demo
'Written by Birdie

Import MaxGui.Drivers

Strict
SetGraphicsDriver GLGraphicsDriver(),GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER

Global ax#, ay#,tim#

Local w:TGadget = CreateWindow("Easy GL Cube in a GUI window", 10, 10, 512, 512 )

Local c:TGadget = CreateCanvas(0,0,w.ClientWidth(),w.ClientHeight(),w,0)
c.setlayout 1,1,1,1
CreateTimer( 60 )

While True
        WaitEvent()
        Select EventID()
                Case EVENT_WINDOWCLOSE
                        End
                Case EVENT_TIMERTICK
                        RedrawGadget c
                        
                Case EVENT_GADGETPAINT
                        SetGraphics CanvasGraphics( c )
                                Local wid = c.ClientWidth()
                                Local hgt = c.ClientHeight()
                                Local asp# = Float(wid)/Float(hgt)
                                
                                glViewport 0,0,wid,hgt
                                glMatrixMode GL_PROJECTION
                                glLoadIdentity
                                gluPerspective 45, asp, 1, 100
                                gltranslatef 0,0,-50+tim
                                tim=20*Cos(MilliSecs()/10.0)
                                
                                glMatrixMode GL_MODELVIEW
                                glLoadIdentity
                                
                                Local global_ambient#[]=[0.6#, 0.5#,  0.3#, 1.0#]
                                Local light0pos#[]=     [0.0#, 5.0#, 10.0#, 1.0#]
                                Local light0ambient#[]= [0.5#, 0.5#,  0.5#, 1.0#]
                                Local light0diffuse#[]= [0.3#, 0.3#,  0.3#, 1.0#]
                                Local light0specular#[]=[0.8#, 0.8#,  0.8#, 1.0#]
                        
                                Local lmodel_ambient#[]=[ 0.2#,0.2#,0.2#,1.0#]
                                glLightModelfv(GL_LIGHT_MODEL_AMBIENT,lmodel_ambient)
                        
                                glLightModelfv(GL_LIGHT_MODEL_AMBIENT, global_ambient)
                                glLightfv(GL_LIGHT0, GL_POSITION, light0pos)
                                glLightfv(GL_LIGHT0, GL_AMBIENT, light0ambient)
                                glLightfv(GL_LIGHT0, GL_DIFFUSE, light0diffuse)
                                glLightfv(GL_LIGHT0, GL_SPECULAR, light0specular)
                                glEnable(GL_LIGHTING)
                                glEnable(GL_LIGHT0)
                                glShadeModel(GL_SMOOTH)
                                glMateriali(GL_FRONT, GL_SHININESS, 128)
        
                                                                
                                glClearColor 0,0,0.5,1
                                glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)

                                glEnable(GL_DEPTH_TEST)
                                
                                glRotatef ax,1,0,0
                                glRotatef ay,0,1,0
                                ax:+1
                                ay:+5
                                DrawSizeCube(7)
                                
                                Flip
                                
        EndSelect
Wend



Function DrawSizeCube(size#)
        size=-size
        'Front Face
        glBegin(GL_TRIANGLE_STRIP)
                glNormal3f( 0.0, 0.0, 1.0)
                glVertex3f( size, size,-size)
                glNormal3f( 0.0, 0.0, 1.0)
                glVertex3f(-size, size,-size)
                glNormal3f( 0.0, 0.0, 1.0)
                glVertex3f( size,-size,-size)
                glNormal3f( 0.0, 0.0, 1.0)
                glVertex3f(-size,-size,-size)
        glEnd
        'Back Face
        glNormal3f( 0.0, 0.0, -1.0)
        glBegin(GL_TRIANGLE_STRIP)
                glVertex3f(-size, size, size)
                glVertex3f( size, size, size)
                glVertex3f(-size,-size, size)
                glVertex3f( size,-size, size)
        glEnd
        'Right Face
        glNormal3f( 1.0, 0.0, 0.0)
        glBegin(GL_TRIANGLE_STRIP)
                glVertex3f(-size, size,-size)
                glVertex3f(-size, size, size)
                glVertex3f(-size,-size,-size)
                glVertex3f(-size,-size, size)
        glEnd
        'Left Face
        glNormal3f( -1.0, 0.0, 0.0)
        glBegin(GL_TRIANGLE_STRIP)
                glVertex3f( size, size, size)
                glVertex3f( size, size,-size)
                glVertex3f( size,-size, size)
                glVertex3f( size,-size,-size)
        glEnd
        'Bottom Face
        glNormal3f( 0.0, -1.0, 0.0)
        glBegin(GL_TRIANGLE_STRIP)
                glVertex3f( size, size,-size)
                glVertex3f( size, size, size)
                glVertex3f(-size, size,-size)
                glVertex3f(-size, size, size)
        glEnd
        'Top Face
        glNormal3f( 0.0, 1.0, 0.0)
        glBegin(GL_TRIANGLE_STRIP)
                glVertex3f( size,-size,-size)
                glVertex3f(-size,-size,-size)
                glVertex3f( size,-size, size)
                glVertex3f(-size,-size, size)
    glEnd
End Function




Henri(Posted 2016) [#41]
Hi,

the manual way would be to replace 'Import MaxGui.Drivers' with 'Framework MaxGui.Drivers' . This would only import Maxgui.drivers and make the exe significantly smaller.

Next, if you run it you'll get "Identifier 'GLGraphicsDriver' not found". Now, press F1-key twice on the problematic keyword and scroll on top of the presented help page. There you will find that 'GLGraphicsDriver' is part of BRL.Graphics so add 'Import BRL.graphics' under 'Framework' - statement. Repeat these steps until your program runs (there are 2 more).

For more automatic way (although not 100 % perfect) use Framework Assistant.

-Henri


RustyKristi(Posted 2016) [#42]
Thanks Henri for the tip! :)


Bobysait(Posted 2016) [#43]
Just to let you know :

-> On Ubuntu 16.04 lts (64 bits version - Amd 64 6*3Ghz processor ... if relevant)
I had to manually instal the i386 versions of the libraries in order to get "./MaxIDE" running.


So, for thoose who are afraid to never find how to solve the problem of "error while loading shared libraries[...] cannot open blablabla", just instal the libraries suffixed with ":i386"



list of the libraries I had to add (and the command that works with them):
- libX11
- libXxf86
- libGL
- libXft
- libXpm

sudo apt-get install libxxf86vm-dev:i386 libglu1-mesa-dev:i386 x11proto-core-dev:i386 x11proto-gl-dev:i386 x11proto-kb-dev:i386 libasound2-dev:i386 libidn11-dev:i386 libxft-dev:i386 x11proto-xext-dev:i386 libxpm-dev:i386


I also had to manually set the script
IS_64_BIT = 1 to get the script running.


ps : I'm not a very good linux user, so there are probably some obvious things, but...
I really think beginners whow want to go on with Linux and blitzmax will never get blitzmax running with the infos published on the blitz website.


dawlane(Posted 2016) [#44]
The script in this thread are seriously out dated. I would recommend anyone new to Linux and BlitzMax to use How To: Dependencies Ubuntu/Debian/Mint Apr 2015 for Ubuntu, Linux Mint and Debian. There are others for different distributions, but they are not updated as often unless someone posts that they have a problem.

A side note. Using the i386 development libraries (e.g. libxxf86vm-dev:i386) 'WILL' break any 64 bit development libraries installed.
To fix it you would have to reinstall the normal development libraries, thus crippling BlitzMax linking again.
How To: Dependencies Ubuntu/Debian/Mint Apr 2015 fixes this problem.


Bobysait(Posted 2016) [#45]
I think there should be a "sticky" topic with the most recent script.
There are too many topics that became irrelevant and the first one is never the good one :/

Like this one that was on top while the previous one was more updated (the one you mentionned)


RustyKristi(Posted 2016) [#46]
I would suggest using GitHub and someone could initiate the latest working script, post the link to the script repo then just make commits/changes by contributors when needed.


skidracer(Posted 2016) [#47]
Fixed. Thanks dawlane.


dawlane(Posted 2016) [#48]
The updated version for OpenSUSE is How To: Dependencies OpenSUSE 13.x, Leap 42.x

At some point I will get round to updating Fedora, Magiea and maybe ArchLinux.

Edit: How to: Dependencies Fedora 22/23