I'm a OSX newbie so please be kind. dlopen() won't load a dylib, dlerror() returns:
Unable to 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 eight bytes: 0x21 0x3c 0x61 0x72 0x63 0x68 0x3E 0x0A
I believe this means something is wrong with my dylib, but I don't know what. I also tried creating the lib as a bundle by changing the project values shown below, but I still get the same error:
MACH_O_TYPE mh_bundle
LIBRARY_STYLE BUNDLE
Please point me in the right direction. We need to load the lib at runtime because we will load a different lib depending on runtime parameters and we try to use dlopen() to keep code identical across platforms (Solaris, Trusted Solaris, Linux, OSX) but replacing dlopen() with a different function call will be fine in this case as long as we can load the lib at runtime. Please help!
Unable to 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 eight bytes: 0x21 0x3c 0x61 0x72 0x63 0x68 0x3E 0x0A
I believe this means something is wrong with my dylib, but I don't know what. I also tried creating the lib as a bundle by changing the project values shown below, but I still get the same error:
MACH_O_TYPE mh_bundle
LIBRARY_STYLE BUNDLE
Please point me in the right direction. We need to load the lib at runtime because we will load a different lib depending on runtime parameters and we try to use dlopen() to keep code identical across platforms (Solaris, Trusted Solaris, Linux, OSX) but replacing dlopen() with a different function call will be fine in this case as long as we can load the lib at runtime. Please help!