Error when building anything in BlitzMax

BlitzMax Forums/BlitzMax Beginners Area/Error when building anything in BlitzMax

berserk(Posted 2016) [#1]
Hello there.
I get the following error when building anything with BlitzMax:
Building breakout
Compiling:breakout.bmx
flat assembler  version 1.68  (1048560 kilobytes memory)
4 passes, 33923 bytes.
Linking:breakout.debug
/usr/bin/ld: /home/berserk/Scaricati/BlitzMax/mod/pub.mod/openal.mod/openal.debug.linux.x86.a(openal.c.debug.linux.x86.o): undefined reference to symbol 'dlopen@@...'
//lib/i386-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Build Error: Failed to link /home/berserk/Scaricati/BlitzMax/samples/breakout/breakout.debug
Process complete


What should I do?
Thanks in advance for any help.


dawlane(Posted 2016) [#2]
Did you apply the patch? This will only work on a clean extracted BlitzMax folder and should be applied before you build anything.
http://www.blitzbasic.com/Community/post.php?topic=101454&post=1320929

I take it that you are a Linux newbee. The Linker is telling you that a function you are trying to use cannot be resolved as it requires a library or object file that has that function code. In this case its trying to find a function that deals with shared libraries and would be in a library named libdl. To Link such a library you would use:
Import "-ldl"
somewhere in your code.


berserk(Posted 2016) [#3]
I'm not a newbie with Linux, but I am with blitz.
I already applied the patch, I had no alternative as I have a 64 bit machine and blitzmax didn't start.
Now the ide works, but I can't build.


dawlane(Posted 2016) [#4]
'm not a newbie with Linux
My apologies.

Have you rebuilt all the modules with
~/BlitzMax/bin/bmk makemods -a
The above assumes that BlitzMax is in your home directory, so don't forget to change the path to suit.

The patch makes changes to the modules, so any changes made to the modules must have the modules updated/rebuilt.
I would not recommend using the IDE to do this, as it has been known to crash the IDE when a problem arises.

I suspect that the next problem you will be posting about will be the release build crash with GCC version newer than 4.8.4-ish.

I would recommend that you switch to Brucey's BlitzMax NG. There is an automate installer script that I knocked up to install BlitzMax and BlitzMax NG.
http://www.blitzbasic.com/Community/posts.php?topic=106957


berserk(Posted 2016) [#5]
Thanks a lot.
Now BMax builds with no problems, the only remaining issue is that I get no audio.


berserk(Posted 2016) [#6]
Nevermind, maybe the breakout sample is w/o audio.
I tried the shooter and the audio works.