I could not see what exceptions you get.
This snippet, created from your code (removed _putenv, _snprintf_s replaced w/ simple sprintf) compiles and converts single ARW file to jpeg: https://www.dropbox.com/s/1lq7npmuip2xne5/raw2jpeg.zip?dl=0
example.txt cut to write function only (JPEG read complains about put_scanline_someplace, so entire JPEG reading code removed).
Needed #includes added to example.txt and main (stdlib.h)
Compiled/tested under FreeBSD (under Linux is should be the same) using this command line:
clang -I/usr/local/include -I../LibRaw -o raw2jpeg main.cpp example.cpp -L/usr/local/lib -ljpeg -L../LibRaw/lib -lraw -lcxxrt
libjpeg-turbo 2.0.2 is installed in /usr/local
LibRaw is compiled in ../LibRaw
I could not see what exceptions you get.
This snippet, created from your code (removed _putenv, _snprintf_s replaced w/ simple sprintf) compiles and converts single ARW file to jpeg: https://www.dropbox.com/s/1lq7npmuip2xne5/raw2jpeg.zip?dl=0
example.txt cut to write function only (JPEG read complains about put_scanline_someplace, so entire JPEG reading code removed).
Needed #includes added to example.txt and main (stdlib.h)
Compiled/tested under FreeBSD (under Linux is should be the same) using this command line:
clang -I/usr/local/include -I../LibRaw -o raw2jpeg main.cpp example.cpp -L/usr/local/lib -ljpeg -L../LibRaw/lib -lraw -lcxxrt
libjpeg-turbo 2.0.2 is installed in /usr/local
LibRaw is compiled in ../LibRaw