0
0

Hi,

I was searching for a cross platform music player library so I’ll be able to add it to a plugin I’m writing for X-Plane.

X-Plane seems to need its plugin to be built as "shared library" and not static one.

On windows it was quite easy to make the plugin work with the fmod DLL and music produced nicely from X-Plane.

I’m currently trying to build my plugin and link it against Linux.
Compilation seems to be ok, but when I build the plugin as a shared library, it does not find "fmods" library. It only works when I change the building into a static library ( which does not load/supported under X-Plane ).

Here is a snippet from the linker output ( I removed many of the "*.o" file to keep it shorter )

[quote:1tgsyz6p]
make all
Building target: lin.xpl
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -L/media/linshare/ubuntu/c++/x-plane/resource/fmod/fmodapi43207linux/api/lib -L/usr/lib -pthread -shared -o"lin.xpl" ./src/V1.2/v120/Area.o … ./src/V1.2/v120/db/Item.o ./src/V1.2/v120/db/Store.o -llibfmodex.so
/usr/bin/ld: cannot find -llibfmodex.so
collect2: ld returned 1 exit status
make: *** [lin.xpl] Error 1
[/quote:1tgsyz6p]

I put the library file under all the "library folders", i.e: -L/usr/local/lib -L/media/linshare/ubuntu/c++/x-plane/resource/fmod/fmodapi43207linux/api/lib -L/usr/lib, but as you can see from the error message "ld" could not find it.

What should I do in order to implement the fmod library into a plugin that needs to be built as "shared library".

I’m currently working under "Mint 10" distro and my IDE is Eclipse.
In my code, I included the following fmod files:

[code:1tgsyz6p]

include "fmod.hpp"

include "fmod_errors.h"

[/code:1tgsyz6p]

Any ideas please ?

Thanks

  • You must to post comments
0
0

It seems that I did not link correctly under Linux ( hey I program under VS how could I know 😮 ).

My Linking should have been:

[quote:2atnboz3]-lfmodex [/quote:2atnboz3]

and not

[quote:2atnboz3]-llibfmodex.so
[/quote:2atnboz3]

Now it works… :)

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.