Dear all,
I'm developing a software that uses libraw. This software is multi-platform and is able to run on GNU/Linux, OS X, FreeBSD and Windows through MSYS2.
Indeed, libraw is available on MSYS2 and that makes things easy. However there's a small issue that is kind of annoying: I cannot use the function
libraw_open_wfile
as I would like to do. For example with libtiff i use TIFFOpenW.
Indeed, in libraw.h this line:
#if defined(_WIN32) && !defined(__MINGW32__) && defined(_MSC_VER) && (_MSC_VER > 1310)
make the function unavailable on MSYS2. However, this function should work on every Windows system because it is not possible for now to use wide chars as "é" "è" or others in filename.
So, do you think it could be possible for you to fix this issue in a next release ? I understand it may not be your priority but as libraw is available on MSYS2 I really think it should be fixed.
Or maybe you have a workaround to open filename with wide chars.
My best regards
This code line is because
This code line is because some (old) versions of MinGW does not support wide chars in file opening interface.
If that has changed, this line should be changed too (with compiler/runtime/whatever version check).
We're open to contributions, so if you could investigate the problem in depth (what versions/runtimes works with wchar_t and what is not), just propose patch.
Alternatively, you may create own Libraw datastream implementation and pass it to LibRaw.
-- Alex Tutubalin @LibRaw LLC
OK I will try to investigate,
OK I will try to investigate, but I tried to compile libraw on MSYS2 with no sucess.
I've a lot of
Makefile.mingw builds LibRaw
Makefile.mingw builds LibRaw with -DLIBRAW_NODLL, so DllDef is defined empty
-- Alex Tutubalin @LibRaw LLC
OK thanks. Can I disable that
OK thanks. Can I disable that ?
I can not understand the
I can not understand the question. What feature you want to disable?
-- Alex Tutubalin @LibRaw LLC
Sorry I think I misunderstood
Sorry I think I misunderstood.
The problem is because the error I cannot compile the lib to test it. I thought you told me by removing the flag it would be ok.
Sorry,
Makefile.mingw already
Makefile.mingw already defines -DLIBRAW_NODLL, so disabling DllDef (and, of course, DLL builds):
DllDef is defined in libraw_types.h:
#ifdef WIN32
#ifdef LIBRAW_NODLL
#define DllDef
#else
#ifdef LIBRAW_BUILDLIB
#define DllDef __declspec(dllexport)
#else
#define DllDef __declspec(dllimport)
#endif
#endif
#else
#define DllDef
#endif
-- Alex Tutubalin @LibRaw LLC
OK, I got it. Thank you.
OK, I got it. Thank you.
example of libtiff
Also, I took a look to the code of libtiff that is also included in msys2: