Linking error - 1st attempt to use Linux BlitzMax
Archives Forums/Linux Discussion/Linking error - 1st attempt to use Linux BlitzMax
| ||
After many successful years with Windows BlitzMax and, more recently, a win with Mac OSX, I decided to give Linux a go. But I'm a Linux newbie. I'm using Fedora 14. My "hello World" produces this when I try to compile, link and run: Linking:untitled1.debug /usr/bin/ld: /home/liveuser/Peter/BlitzMax/mod/pub.mod/openal.mod/openal.debug.linux.x86.a(openal.c.debug.linux.x86.o): undefined reference to symbol 'dlopen@@...' /usr/bin/ld: note: 'dlopen@@...' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line /lib/libdl.so.2: could not read symbols: Invalid operation collect2: ld returned 1 exit status Build Error: Failed to link /home/liveuser/Peter/BlitzMax/tmp/untitled1.debug Can one of you Linux gurus help? Thanks ... Peter Last edited 2011 |
| ||
Look at this thread: http://blitzbasic.com/Community/posts.php?topic=88613 Run this script, it will install all dependencies BlitzMax needs. |
| ||
Thank you for your reply. Sadly I had already run that script and it completed without error. Peter |
| ||
Have you rebuilt all the modules? The build error refers to a version of glibc that you appear not to have installed on your system - which implies that your version of linux is significantly newer than that against which the modules were compiled.... |
| ||
Yes - I rebuilt all the modules. Peter |
| ||
You could try adding :?linux Import "-ldl" ? to pub.mod/openal.mod/openal.bmx, somewhere after ModuleInfo, and before Private... |
| ||
Is your middle name "Magic" per chance? Thanks a heap! I had to rebuild all modules - couldn't work out how to just rebuild this module but now we're looking good! Peter |
| ||
No worries ;-) The IDE doesn't let you build specific modules, but if you are happy with the command-line you can do things like this from the BlitzMax/bin dir : rebuild all modules : ./bmk makemods -a build all modules (only compiles those which have changed since the last build) : ./bmk makemods re-build a specific module : ./bmk makemods -a pub.openal build a specific module (only compiles if it has changed since last time) : ./bmk makemods pub.openal If you want to make multi-thread builds of the modules you need to add -h flag after "makemods". HTH |
| ||
Thanks for that. Rebuilding the lot didn't take long. Any thoughts on what I should look at to get sound working? Peter |
| ||
Ouch, it looks like both ALSA and OSS audio systems have now been displaced by PulseAudio in world of Linux. Unfortunately BlitzMax doesn't yet support PulseAudio API so you could try using OpenAL, at top of your program try:EnableOpenALAudio() SetAudioDriver("OpenAL Default") Last edited 2011 |
| ||
Didn't help. Both the above lines return False. Do I need to install some package? Peter <later> started a new topic. Last edited 2011 Last edited 2011 |