@Sergey: Yes, with the _MSC_VER macro this applies only to MSVC
@jshanab: This would only links against the anyway required library ws2_32.lib (no additional includes), it works even if you specify to link the library in your cmake script.
Probably the question is more whether it is worth automatically link this library for MSVC, but not for a mingw setup or any other setup.
Simon
On Friday, March 30, 2012 9:13:03 PM UTC+2, Sergey Lyubka wrote:
On Fri, Mar 30, 2012 at 4:55 PM, jeff shanab
<jsha...@gmail.com> wrote:
Won't this potentially break some build systems that generate the solutions like cmake, eclipse, codeblocks, etc.
Is this pragma a visual studio only shorthand to include something that should be in the project?
If so, do we want to put in source code such build project details?
I think it should be fine, #if defined(_MSC_VER) should is true only for microsoft compiler.
Hi,
I suggest to add the following line into mongoose.c:
#if defined(_MSC_VER)
#pragma comment (lib, "Ws2_32.lib")
#endif
This automatically links the sepcified lib-file when using MSVC.
Cheers Simon
--
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.