Building libstrophe on Windows

163 views
Skip to first unread message

Randy Brandenburg

unread,
Sep 19, 2018, 5:27:20 PM9/19/18
to libstrophe

Wondering (hoping really) that someone can steer me in the proper direction. I am attempting to use the libstrophe XMPP library within a Windows application. However, I cannot find any information on how to build or obtain a static lib or DLL that can be used.

 

Any information on this topic would be appreciated. 

Robert

unread,
Sep 20, 2018, 4:27:33 AM9/20/18
to libstrophe
Building a Windows library requires a lot of hoops to be jumped through.   I compiled it recently, and would be happy to send you either the complete build directory (about 140MB) so you can compile it yourself, or just the final DLLs (Release and Debug), which include DLLs for expat and openssl, which I also compiled.   Compiling is achieved with Visual Studio, and there is a free version of that you can download.

Randy Brandenburg

unread,
Sep 20, 2018, 7:44:17 AM9/20/18
to libstrophe
Either would be great. I was attempting to build a static lib as opposed to a DLL, but anything is acceptable at this point. I have licensed copies of VS 2013/2015/2017 would appreciate the VS project/solution The DLLs would be fine for starters. Can you zip and email or attache to a reply to this post? Then maybe we can discuss how to get the source, probably too big for my email server to handle. 

Dmitry Podgorny

unread,
Sep 20, 2018, 9:57:07 AM9/20/18
to libstrophe
Hello,

I'm not a Windows user, so can't help you with VS. But I can point at some moments that you need to know to build libstrophe in general.

First of all you need to be aware of parser and tls "modules". You must add exactly one tls and one parser implementation to the project and omit the rest tls_* and parser_* files. I would recommend to use parser_expat.c and tls_openssl.c. Other files you must not add to the project are oostanza.cpp and oocontext.cpp.
Second, make sure compiler finds strophe.h. Just add path where it's located to the heades path.
Third, you need to manage external dependencies what includes expat/opennssl header files and libraries. Sorry, I can't help with this part.

There is a way to build libstrophe as standalone static library without dependencies, but without TLS support. Simply add expat sources to the libstrophe project and use tls_dummy.c instead of tls_openssl.c.

Also, check this pull request: https://github.com/strophe/libstrophe/pull/15 . It adds project files for VS2012. Other thing that may help you is cmake project files.I believe cmake has Windows support and you can find libstrophe forks on github with added cmake files.

Dmitry.

Randy Brandenburg

unread,
Sep 20, 2018, 10:23:50 AM9/20/18
to libstrophe
Thanks for the great info Dmitry..

Robert

unread,
Sep 20, 2018, 11:01:03 AM9/20/18
to libstrophe
I've uploaded the (zipped) files to We Transfer, so you can download them.   IIRC, you'll have two weeks to download them before they self-destruct.

Randy Brandenburg

unread,
Sep 20, 2018, 11:17:28 AM9/20/18
to libst...@googlegroups.com
Thanks very much!



Sent from my awesome phone.
--
You received this message because you are subscribed to the Google Groups "libstrophe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libstrophe+...@googlegroups.com.
To post to this group, send email to libst...@googlegroups.com.
Visit this group at https://groups.google.com/group/libstrophe.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages