Readme to build mosquitto on Windows

Asked by Venkates Velayutham

It would be useful to run mosquitto during development and testing. Can you please provide a readme to build mosquitto on Windows?

Thanks,

Venki

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Light
Solved:
Last query:
Last reply:
Revision history for this message
Venkates Velayutham (venky) said :
#1

I installed Cygwin on windows, built sqlite3 inside cygwin shell, then when I built mosquitto0-0.8.2 inside cygwin shell, I received error saying ld couldn't find -lsqlite3. I noticed sqlite libraries installed in /usr/local/lib, but still sqlite3 library not found in the path. I also set LD_LIBRARY_PATH pointing to /usr/local/lib inside cygwin shell. Any help is appreciated.

Thanks,

Venki

Revision history for this message
Roger Light (roger.light) said :
#2

Sorry, I forgot this still needed answering.

Download and run the cygwin installer from http://www.cygwin.com/
You'll need to select the following packages to be installed from the list:
* binutils
* gcc4-core
* gcc4-gcc
* libpcre0
* libsqlite3-devel
* libsqlite3_0
* libwrap-devel
* libwrap0
* make
* mercurial
* sqlite3 (optionally - can be used to check persistent database data)
* wget

Once everything has installed, start cygwin. You now need to obtain the source for mosquitto. If you wish to compile a released version, do the following (updating the version number appropriately):

* wget http://mosquiitto.org/files/source/mosquitto-0.8.2.tar.gz
* tar zxf mosquitto-0.8.2.tar.gz
* cd mosquitto-0.8.2

If you want to use the unreleased code from the repository, do the following:

* hg clone http://bitbucket.org/oojah/mosquitto
* cd mosquitto

If you already have a copy of the repository code and want to update, do the following to get the latest version:

* cd mosquitto
* hg pull -u

Compiling should now be as simple as typing "make". Note that there will be an error when trying to create the man page documentation - this is non-critical.

To now use the compiled mosquitto broker you need the sqlite pcre extension dll. The easiest way to obtain this is to download one of the mosquitto Windows binary releases.

You can now run mosquitto through cygwin, or if you want to run it by double clicking then you will need to place the appropriate dlls in its directory - again, see the Windows binary releases.

Revision history for this message
Best Roger Light (roger.light) said :
#3

Roger Light suggests this article as an answer to your question:
FAQ #1264: “How can I build the mosquitto broker on Windows?”.

Revision history for this message
Venkates Velayutham (venky) said :
#4

Thanks Roger Light, that solved my question.