I want to use Oracle instantclient libraries for C++. I use Xcode as an IDE. I added the occi library by Project > Build Phase > Link binary with libraries. I am having the following warning and error at compilation.
warning: skipping file '/Users/user/Library/Oracle/instantclient_12_2/libocci.dylib.12.1' (unexpected file type 'text.man' in Frameworks & Libraries build phase)
error: Undefined symbols for architecture x86_64: "oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* ()(void, unsigned long), void* ()(void, void*, unsigned long), void ()(void, void*))", referenced from: _main in main.o
Certainly, the error is due to the warning. It looks like the issue is coming from the version number (.12.1) at the end of the file after the ".dylib" (I don't have the issue for other libraries in the same folder for which the name does not have the version number after the file extension).
The instantclient library can be downloaded here. You will see that the downloaded folder will contain files libocci.dylib and libocci.dylib.12.1. The first one being a link to the second one:
ls -l *occi*
lrwxr-xr-x@ 1 user wheel 18 Mar 23 14:01 libocci.dylib -> libocci.dylib.12.1
-rwxr-xr-x@ 1 user wheel 1465312 Jan 9 2018 libocci.dylib.12.1
I tried with the two files and Xcode will automatically use libocci.dylib.12.1.
Questions:
- Why the version number is set after the
.dylib
extension? - Why the compiler does not recognize the file type?
- What to do in order the compiler to recognize the file type?