I'm currently trying to compile redland (librdf http://librdf.org/ ) under Windows. According to their website, it should be built under Windows. Since I do not want to waste my time fixing .sln, I thought about compiling librdf (and the necessary projects) in cygwin, and then using the library in visual studio.
So my question is: Is it possible to use libraries in cygwin in a Windows application? And if so, how?
As a window designer, I do not know if there is any difference from the created .a files in the .dlls. I already read this topic and you will need to include cygwin1.dll in the project, but that will not be a problem.
Or does anyone know better how I can get redland compiled as a Windows DLL? I was thinking about using mingw, but so far I have not been able to compile it.
Any help would be appreciated.
thanks
Update:
Thanks to the help of Yaakov (and his pretty cool cygwin ports), in the meantime, I managed to build raptor (which is a prerequisite for librdf). All I had to do was enable one more argument for configure: --with-xml2-config = / usr / x86_64-w64-mingw32 / sys-root / mingw / bin / xml2-config
Now I am trying to compile rasqal, which is another props, and also depends on raptor2. To do this, I had to export PKG_CONFIG_PATH = "/ usr / x86_64-w64-mingw32 / sys-root / mingw / lib / pkgconfig /" for pkg-config to find the correct raptor installation.
So, configure rasqal to work, but when I try to do this, I get the following error:
Making all in src make[1]: Entering directory `/home/Stefan/workspace/rasqal/src' make all-am make[2]: Entering directory `/home/Stefan/workspace/rasqal/src' /bin/sh ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -DRASQAL_INTERNAL=1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/raptor2 -g -O2 -DMTWIST_CONFIG -I../libmtwist -g -O2 -MT rasqal_algebra.lo -MD -MP -MF .deps/rasqal_algebra.Tpo -c -o rasqal_algebra.lo rasqal_algebra.c libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -DRASQAL_INTERNAL=1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/raptor2 -g -O2 -DMTWIST_CONFIG -I../libmtwist -g -O2 -MT rasqal_algebra.lo -MD -MP -MF .deps/rasqal_algebra.Tpo -c rasqal_algebra.c -DDLL_EXPORT -DPIC -o .libs/rasqal_algebra.o In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/time.h:10:0, from rasqal.h:116, from rasqal_algebra.c:39: /usr/x86_64-w64-mingw32/sys-root/mingw/include/time.h:260:8: error: redefinition of 'struct timezone' ./win32_rasqal_config.h:62:8: note: originally defined here Makefile:1045: recipe for target `rasqal_algebra.lo' failed make[2]: *** [rasqal_algebra.lo] Error 1 make[2]: Leaving directory `/home/Stefan/workspace/rasqal/src' Makefile:720: recipe for target `all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/Stefan/workspace/rasqal/src' Makefile:484: recipe for target `all-recursive' failed make: *** [all-recursive] Error 1
What I can’t get around, I’m not going to cross-compile. Can someone point me in the right direction?