[Mono-osx] Native dylib works in terminal, not in monodevelop

AlexGray alex.j.gray23 at gmail.com
Thu Feb 7 22:26:05 UTC 2013


So I have a native library that I wish to use with my mono app, this wasn't
working at first , but using the terminal command 

MONO_LOG_LEVEL=debug mono ArucoSwigTestProject.exe

I was able to get the app finding my native library in terminal, it was a
rather simple case of renaming the library to something that was being
searched for.

Despite my application working when run from the terminal, when I want to
run it in monodevelop i get this error:


Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for arucoPINVOKE --->
System.TypeInitializationException: An exception was thrown by the type
initializer for SWIGExceptionHelper ---> System.DllNotFoundException: aruco
  at (wrapper managed-to-native)
arucoPINVOKE/SWIGExceptionHelper:SWIGRegisterExceptionCallbacks_aruco
(arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate)
  at arucoPINVOKE+SWIGExceptionHelper..cctor () [0x000ee] in
/Users/ericwoods/Aruco/ArucoSwigTestProject/ArucoSwig/arucoPINVOKE.cs:105 
  --- End of inner exception stack trace ---
  at arucoPINVOKE..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at ArucoBossCamera..ctor (System.String filename) [0x00000] in <filename
unknown>:0 
  at Imaginality.Toolkit.ArucoTK.ArucoTKCamera..ctor (Device device, Toolkit
tk, System.String cameraParamsFile) [0x0002c] in
/Users/ericwoods/Aruco/ArucoSwigTestProject/ArucoSwigTestProject/ArucoTKCamera.cs:42 
  at Imaginality.Toolkit.ArucoTK.Program.Main (System.String[] args)
[0x00000] in
/Users/ericwoods/Aruco/ArucoSwigTestProject/ArucoSwigTestProject/Program.cs:42 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An
exception was thrown by the type initializer for arucoPINVOKE --->
System.TypeInitializationException: An exception was thrown by the type
initializer for SWIGExceptionHelper ---> System.DllNotFoundException: aruco
  at (wrapper managed-to-native)
arucoPINVOKE/SWIGExceptionHelper:SWIGRegisterExceptionCallbacks_aruco
(arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate,arucoPINVOKE/SWIGExceptionHelper/ExceptionDelegate)
  at arucoPINVOKE+SWIGExceptionHelper..cctor () [0x000ee] in
/Users/ericwoods/Aruco/ArucoSwigTestProject/ArucoSwig/arucoPINVOKE.cs:105 
  --- End of inner exception stack trace ---
  at arucoPINVOKE..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at ArucoBossCamera..ctor (System.String filename) [0x00000] in <filename
unknown>:0 
  at Imaginality.Toolkit.ArucoTK.ArucoTKCamera..ctor (Device device, Toolkit
tk, System.String cameraParamsFile) [0x0002c] in
/Users/ericwoods/Aruco/ArucoSwigTestProject/ArucoSwigTestProject/ArucoTKCamera.cs:42 
  at Imaginality.Toolkit.ArucoTK.Program.Main (System.String[] args)
[0x00000] in
/Users/ericwoods/Aruco/ArucoSwigTestProject/ArucoSwigTestProject/Program.cs:42 
The application was terminated by a signal: SIGHUP

Is there a way to even get the same level of debug logging that I had in the
terminal? I have already set launchd.conf to include the line

setenv MONODEVELOP_CONSOLE_LOG_LEVEL debug

Which I thought would have done the trick, but it doesn't seem to.

I am quite new to OSX, so I am open to the fact that I might have missed
something basic. Any help is much appreciated.



--
View this message in context: http://mono.1490590.n4.nabble.com/Native-dylib-works-in-terminal-not-in-monodevelop-tp4658514.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list