Simple binary build #1408
-
I came here looking for a simple, single file webserver to serve static HTTP content. I realise that Mongoose can do way more than this, but it does also appear to be the best choice for this application, in which simplicity is the key element. However it appears that it is no longer possible to download binaries, as covered here: https://stackoverflow.com/questions/29561734/i-cant-download-the-mongoose-exe/35801034#35801034 I have checked out the HTTP tutorial at https://mongoose.ws/tutorials/http-server/, and it is certainly straightforward, however I'm not familiar with the C++ toolset and have no idea how to build the source. At the moment I have been force to use an old version at https://www.softpedia.com/get/Internet/Servers/WEB-Servers/Mongoose.shtml, which works like a charm but I think you would agree is extremely non ideal from a security and availability perspective. However it's my only choice other than spending hours, perhaps days, attempting to get a build to work. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 9 replies
-
Sure!
|
Beta Was this translation helpful? Give feedback.
-
Thanks Sergey, that was much simpler than I thought it would be. The tools are all built in. |
Beta Was this translation helpful? Give feedback.
-
I've described the procedure for windows. You can build |
Beta Was this translation helpful? Give feedback.
-
Sure, what I mean is for other people who don't have access to a Mac or Linux box and want to do the build on Windows. You have solved the issue for me, but I'm trying to solve the general problem here, especially since this is such a great all-round tool ;-) |
Beta Was this translation helpful? Give feedback.
-
I see, thank you. i686-w64-mingw32-gcc ../../mongoose.c main.c -I../.. -W -Wall -DMG_ENABLE_IPV6=1 -DMG_ENABLE_LINES=1 -lws2_32 -o mongoose.exe Let me know if that works. If yes, I'll add an extra |
Beta Was this translation helpful? Give feedback.
-
Thank you @bing2008 . The The answer above was modified to add a section Thanks again. |
Beta Was this translation helpful? Give feedback.
-
I finally got back to this, but was happy to see it had been solved already. Unfortunately for me, I had been assuming that my MinGW install that came as part of the Windows GIT client would do the compile. However it appears to be missing most of this tooling. I just spent two hours trying to get something to work, unsuccessfully. I tried adding the tools to the MinGW I have, but I think it's just too cut down to do the job. So, @bing2008, could you provide any guidance as to which of the toolings you used at https://www.mingw-w64.org/downloads/ We need to provide a comprehensive, no assumptions process all the way from a vanilla Windows install to the final Mogoose build, including download and install of Mingw tooling. |
Beta Was this translation helpful? Give feedback.
-
So here's a complete start-to-end buiold procedure for Windows. Thanks due here.
Finally, you are ready to download the repo and run the make. Open a GIT Bash shell where you want to store the repo, and:
or if that fails, use gcc directly:
The |
Beta Was this translation helpful? Give feedback.
-
@6pac we've created an auto-build for the examples/http-server, with pre-built binaries for Windows, Mac and Linux: https://mongoose.ws/binary/ |
Beta Was this translation helpful? Give feedback.
@6pac we've created an auto-build for the examples/http-server, with pre-built binaries for Windows, Mac and Linux: https://mongoose.ws/binary/