I'm using system() to call an executable binary that runs perfectly fine in the terminal, but does not work in the iOS simulator. I get a runtime error.
The error that I'm getting is:
dyld: unloaded: /software/evpath-4.dev/lib/libcmselect.so dlopen() failed, error: 'dlopen(libcmselect.so, 1): Library not loaded: libcercs_env.1.dylib Referenced from: /software/evpath-4.dev/lib/libcmselect.so Reason: image not found' dlerror() Failed to load required select dll. Search path includes '.', '/usr/local/pkg/working/evpath_base/nightly_build_area/evpath/build', '/software/evpath-4.dev/lib' and any default search paths supported by ld.so
I also have the source code for the binary. I imported all the header files and all the libraries pertaining to the source code. It also builds successfully, but when I try and execute it, it gives me the same error.
Gaurd Malloc is unchecked and I've tried adding a Run Script in the Build Phases that sets all the environments that would have been set given I had run it in a terminal shell.