dlopen() won't load my dylib, help!


i'm osx newbie please kind. dlopen() won't load dylib, dlerror() returns:

unable load /path/to/my.dylib. dlopen(/path/to/my.dylib) failed: dlopen(/path/to/my.dylib): no suitable image found. did find: /path/to/my.dylib: unknown file type, first 8 bytes: 0x21 0x3c 0x61 0x72 0x63 0x68 0x3e 0x0a

believe means wrong dylib, don't know what. tried creating lib bundle changing project values shown below, still same error:

mach_o_type mh_bundle
library_style bundle

please point me in right direction. need load lib @ runtime because load different lib depending on runtime parameters , try use dlopen() keep code identical across platforms (solaris, trusted solaris, linux, osx) replacing dlopen() different function call fine in case long can load lib @ runtime. please help!
 

did compile library same architectures client app? did compile library targeting same or lower base mac os x sdk?

rest, no code, no help.
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments