Hello everybody,
I have written an opensource media management application (https://github.com/lanthale/photoslide) and want to integrate libraw into my app.
My app is written with JavaFX and therefore I want to use libraw via the newly ability of JDK16 to access native libs (C Libs) without writing any glue code.
To archive that I need any native lib in form of a shared C-lib (.so, .dylib, .dll). I have checkout the github sources (master branch) and have used the Makefile.dist (I have not found Makefile.in) to build the lib on OSX and Linux. The result is that I am getting a static lib (.a) but no .dylib/.so. The precompiled libs from 0.18 release are to old to be used under OSX. How can I build a shared lib out of the actual one ?
Can you give me an example or what I have to change in the Makefile.dist to get the shared lib ?
I would appreciate if you can help me to archive this and sorry that I have only base C++ knowledge and do not know how to get the lib on all OS's.
Clemens
shared lib/dll/dylib creation
shared lib/dll/dylib creation is OS specific, it is not easy to create it via single change of Makefile.dist.
If your build environment(s) has GNU autotools/automake installed you could create ./configure script via
autoreconf --install
Than use ./configure && make.
For Windows, dll is created by using Makefile.msvc
-- Alex Tutubalin @LibRaw LLC
The build environment I am
The build environment I am using is OSX 10.15 with xcode and autoreconf installed.
For Windows I could build the dll. But under osx/linux I am getting only the static lib.
Have you tried autoreconf,
Have you tried autoreconf, than configure?
-- Alex Tutubalin @LibRaw LLC
Yes but got some warnings.
Yes but got some warnings. But I have to copy Makefile.dist to Makefile.in.
After that change configure runs to the end. Before it ends with error message that Makefile.in cannot be found.
> But I have to copy Makefile
> But I have to copy Makefile.dist to Makefile.in.
This will not work.
Please use autoreconf --install in full scale.
-- Alex Tutubalin @LibRaw LLC
Also you can use LibRaw 0.20
Also you can use LibRaw 0.20 (see Download section on this site) with pre-generated configure stuff.
-- Alex Tutubalin @LibRaw LLC
Thank you for the hint. I
Thank you for the hint. I will download in the evening and will try to use the configure install option and report back how it worked out.
I have now tried the osx
I have now tried the osx binary.zip file but I does not build at all (./configure was fine, but make had issues)
libraw-osx % make
cd . && /bin/sh automake --foreign
/usr/local/bin/automake: line 23: package: command not found
/usr/local/bin/automake: line 25: use: command not found
/usr/local/bin/automake: line 26: use: command not found
/usr/local/bin/automake: line 27: use: command not found
/usr/local/bin/automake: line 29: BEGIN: command not found
/usr/local/bin/automake: automake: line 31: syntax error near unexpected token `@INC,'
/usr/local/bin/automake: automake: line 31: ` unshift (@INC, '/usr/local/Cellar/automake/1.16.3/share/automake-1.16')'
make: *** [Makefile.in] Error 1
Then I tried a github checkout:
This time I could build with configure and make but the result is always under the lib folder "libraw.a" instat of the "libraw.dylib".
Then I tried the same on Ubuntu and ended up as well with "libraw.a".
How can I get the system to build a shared lib ?
It looks like you have
It looks like you have incomplete/broken autotools installation
-- Alex Tutubalin @LibRaw LLC
Now I have reinstalled the
Now I have reinstalled the whole toolchain and now it is working.
Thank you for the hint.