assimp / assimp-net

Automatically exported from code.google.com/p/assimp-net
192 stars 82 forks source link

loading native library fails on linux #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. implement example from getting started wiki
2. use mono on linux, with xamarin studio and nuget package of assimp-net
3. run example application -> crash

What is the expected output? What do you see instead?

the application crashes because the assimp library is not named assimp64 on 
linux. 

What version of the product are you using? On what operating system?

nuget package of assimp-net. also copied dozens of assimp libraries from latest 
c++ assimp version

Please provide any additional information below.

changing the name has no effect, it seems like the loadlibrary call is 
searching in a wrong directory

i attached my error log

Original issue reported on code.google.com by martin.s...@googlemail.com on 20 Aug 2014 at 8:49

Attachments:

dragorosson commented 6 years ago

Potential solution http://community.monogame.net/t/compile-fbx-from-mac-or-linux/1444

For Protogame, we preload the Assimp assembly on Linux, which prevents Assimp from trying to load it from the default path: https://github.com/hach-que/Protogame/blob/2ca624d76f0d435f8b4fc66f589288da5a29ee8d/Protogame/Assets/Models/FbxReader.cs#L45932 This uses .so files which I built and store in https://code.redpointsoftware.com.au/diffusion/PTPB/browse/master/Linux/27. However, these are likely to be replaced with a Protobuild package in the future, so I wouldn't recommend adding that repository as a Git submodule (instead just maybe copy the .so files out?)

dragorosson commented 6 years ago

Follow-up: I solved my problem the above way, but the DLL I used had to be the one generated from assimp's source (I installed multiple assimp apt packages and the DLLs within didn't work).

See https://github.com/assimp/assimp/blob/master/INSTALL (note this is the parent assimp repo, not the assimp-net wrapper)

The library file was lib/libassimp.so.4.1.0.