Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » Building Mosquitto from Source on win32 - Errors in makefile from source?
icon2.gif  Building Mosquitto from Source on win32 - Errors in makefile from source? [message #1718646] Mon, 28 December 2015 17:52 Go to next message
Daniele Lubrano is currently offline Daniele LubranoFriend
Messages: 5
Registered: December 2015
Junior Member
Hello everyone
I was trying to build Mosquitto right from the sources, using Visual Studio 14 (2015 Community Edition) compiler.
First of all, as the README file says, i used cmake to generate the makefiles and projects, but i think that some version detection problem in present inside the sourcefile.

When i run the build process (despite the unsatisfied dependecies), the compiler refuses to build with errors like:
#error Macro definition of snprintf conflicts with Standard Library function declaration

(this in stdio.h)

Maybe something is wrong inside the various #if somewhere in mosquitto or other dependency headers...

Do you suggest to use a different compiler or different build environment for Windows Binary Build? I tried to compile inside Ubuntu Linux 14.04, mingw, Cygwin (gcc) but doesn't work either for makefile (even regenerated with cmake, or straight from GIT repo) Crying or Very Sad problems or dependency issues (like, libwebsockets isn't declared as a dependency, nor c-ares,libssl, pthread ecc..)

Thanks for reading , hope to get news soon Smile
Re: Building Mosquitto from Source on win32 - Errors in makefile from source? [message #1718666 is a reply to message #1718646] Mon, 28 December 2015 21:57 Go to previous messageGo to next message
Roger Light is currently offline Roger LightFriend
Messages: 90
Registered: September 2013
Member
Hi Daniele,

snprintf() is a standard function in the C99 spec, but until the 2015 version of Visual Studio it wasn't supported by Microsoft. Mosquitto creates a macro for snprintf() on Windows. I'll see about fixing the compilation error for VS 2015.

In the meantime, I'd suggest using Visual Studio 2013 - this is what the openssl binaries are built with as well.

All dependencies are described in the compiling.txt file.

Cheers,

Roger
Re: Building Mosquitto from Source on win32 - Errors in makefile from source? [message #1718808 is a reply to message #1718666] Wed, 30 December 2015 15:20 Go to previous messageGo to next message
Daniele Lubrano is currently offline Daniele LubranoFriend
Messages: 5
Registered: December 2015
Junior Member
Hi Roger, Thanks for your quick response
I saw the compiling.txt files, but something seem to be missing from my env...
I'll try out in the next days with VS2013 and i'll let you know how it's going

Thanks again Smile
Re: Building Mosquitto from Source on win32 - Errors in makefile from source? [message #1718935 is a reply to message #1718666] Sat, 02 January 2016 22:15 Go to previous messageGo to next message
Daniele Lubrano is currently offline Daniele LubranoFriend
Messages: 5
Registered: December 2015
Junior Member
Hi Roger,
first of all, happy new year Smile

I tried to compile with VS 2013, but the errors seems to be endless.
Now my output on the building fail is about every single object/function call to the external libwebsockets

I Attached the console output for you to check the errors.
Is there a ready environment to build mosquitto out there with WS support?

Thanks again,
Daniele
Re: Building Mosquitto from Source on win32 - Errors in makefile from source? [message #1720233 is a reply to message #1718935] Fri, 15 January 2016 13:19 Go to previous messageGo to next message
Daniele Lubrano is currently offline Daniele LubranoFriend
Messages: 5
Registered: December 2015
Junior Member
up
Re: Building Mosquitto from Source on win32 - Errors in makefile from source? [message #1831602 is a reply to message #1720233] Mon, 24 August 2020 18:23 Go to previous message
henry nisce is currently offline henry nisceFriend
Messages: 2
Registered: August 2020
Junior Member
Any updates to this concern? I am getting compilation issues as well, is somebody out there who had successfully compiled the C source code in Visual Studio?
Previous Topic:Compilation issues using Visual Studio
Next Topic:QoS2 Publishes reordered
Goto Forum:
  


Current Time: Thu Apr 25 04:09:35 GMT 2024

Powered by FUDForum. Page generated in 0.03815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top