How to compile Pub.OpenAL on Linux?
BlitzMax Forums/BlitzMax Programming/How to compile Pub.OpenAL on Linux?
| ||
Hi! I want to compile the following code: SuperStrict Framework BRL.Blitz Import Pub.OpenAL On Ubuntu the result is: ![]() dlopen and dlsym are the equivalent to Windows LoadLibrary and GetProcAddress and defined in dlfcn.h . So how can I link dlopen and dlsym to my execute? (btw. have BMax an own linker or use it from GCC/Flatassembler?) cu olli |
| ||
Do you have the OpenAL-Development Libraries installed? |
| ||
No, and this is not necessary for this problem(or?). Becouse, the OpenAL library is loaded at runtime and so the library is not needed by compiling/linking the program. |
| ||
You'll need it to link to the shared library. |
| ||
(btw. have BMax an own linker or use it from GCC/Flatassembler?) It uses the GCC linker.You need to install the OpenAL libraries. |
| ||
You need to :Import "-ldl" |
| ||
Many thanks Brucey!!! I've testet it with Import "libdl.a" or "libdl.so" but all doesn't work. (libdl.so can't import and libdl.a can't statically linked) So for the future - how do you know that "-ldl" is needed? What can be linked with Import(outside of *.bmx, *.c, *.a, *.cpp)? cu olli |
| ||
how do you know that "-ldl" is needed? Experience ;-) In reality, the -l is passed to the linker as you would when using it on the command line. So, for a library called libfish.so, you take of the prefix "lib", and the suffix ".so", leaving you "fish". You would then import with "-lfish". :o) |
| ||
Ahh, ok, thank you :) |