Using opensuse-mingw/Redland on Windows with Visual Studio
Hello, I am fully aware that my request/question might be slightly off topic on this ml. But as I guess others might have the same problem, I still think it might be a good idea... Anyway I am currently trying to get redland (librdf, rasqal, raptor) running on Windows. I had, yet, no luck whatsoever compiling it myself (cygwin+mingw). Some days ago someone pointed me to opensuse-mingw which I didn't know and tbh is a great project. Anyway long story short I catched all the necessary noarch rpms extracted those created .lib files from the included dlls to use them with visual studio. Created a test project linked against the DLLs and was absolutely happy finally having a working redland (latest version). Now the problem, while it is generally "working", as long as you don't pass handles across dll boundaries. For example if you are trying to print a rdf model to the console with "librdf_model_print(model, stdout)" I am getting a access violation exception. Same goes if you want to let redland write to a file and so on. "Unhandled exception at 0x77D03EA0 (ntdll.dll) in Test.exe: 0xC0000005: Access violation writing location 0x00000014." I'm not really familiar with delveopment on linux or compiling there, but I read up to the problem on the windows side and my _guess_ is that it has something to do with dll boundaries [1]. So basically on the windows side a /MD or /MDd compiler option would be needed. But this only goes for the CL compiler not sure about mingw. So now the question, does someone know if there is an fix for getting this running on Windows or can the packages be recompiled with those options to make them work on Windows? I'm not sure if that is a bug etc. cause from my point of view it is very specific and microsoft vs/cl related. Anyway I would appreciate some help or further infos. Best regards Steve [1] http://msdn.microsoft.com/de-de/library/ms235460(v=vs.80).aspx -- To unsubscribe, e-mail: opensuse-mingw+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-mingw+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, On 03/06/13 17:27, Steve wrote:
Now the problem, while it is generally "working", as long as you don't pass handles across dll boundaries. For example if you are trying to print a rdf model to the console with "librdf_model_print(model, stdout)" I am getting a access violation exception. Same goes if you want to let redland write to a file and so on.
That is expected. The libraries from the repositories are linking with msvcrt.dll for C-runtime. If you build with Visual studio other then VC6, you are linking with its runtime that might be msvcr90.dll, msvcr100.dll or msvcr110.dll for the versions 2008, 2010 and 2012. What is the solution? Simply not pass file descriptors across boundaries would be one solution. The other would be to build all raptor, rasqal and redland with visual studio. All the libraries contain *.vcproj files (for raptor it is only raptor1 that contains them) and should be buildable with visual studio. There are some other dependencies that one would need to build, but it would not be a rocket science either as I can see. The other solution would be to build all your project with GCC and use as many of the libraries already built in OBS. Cheers Fridrich - -- Please avoid sending me Word, Excel or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGs1U8ACgkQu9a1imXPdA8b4wCbB4H1UxocUlsZGHAtlxWyUW+r VzkAn2ajNOQJtZlC2PeNtLnNjG4Mlwi2 =zQ3h -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-mingw+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-mingw+owner@opensuse.org
participants (2)
-
Fridrich Strba
-
Steve