Andy Smith wrote:
Alex Burger wrote:


Does anyone have an objection to making the Platform SDK a *requirement* to compile under Windows? This would eliminate the problems we are starting to see with code that expects the SDK to be installed. I can only see the problem getting worse in the future as we start to add more Windows specific features such as host resources etc. Having to waste time figuring out if the code will work without the SDK only because we want to tailor to users who can't be bothered to install the free SDK doesn't make much sense.

I would have to object to making it a requirement to compile on Windows. However I would not object to making it a requirement to compile with MSVC.

I agree. See below.

I asked one of the recent users who had problems compiling without the SDK why he did not have it installed and he basically said there was no real reason. He simply didn't have it and it wasn't a requirement. When I first started working on Net-SNMP, I didn't have the SDK either..

The platform SDK is a *free* download from Microsoft. It is big, but it's free. A CD can be ordered from Microsoft (which is what I did) that costs a small amount to cover shipping if the user does not want to download it.

The average Windows administrator does NOT have MSVC or MinGW. There are probably many more that have MinGW but I suspect that the type of person that would install MinGW or MSVC to compile Net-SNMP would not have an issue downloading the SDK. We are not talking about Linux where downloading, compiling and installing an application is a normal day to day task. It's different in the 'Windows world'.

For the average user that just wants to use the applications, trap receiver or agent (without the SSL library) they now have the option of downloading the latest binary which is compiled with he SDK.


If anyone objects to this, please let me know. If everyone is fine with it, I will modify the projects, makefiles etc for MSVC to only use the SDK. We should do the same for MinGW, but that's a completely separate build system than MSVC so my changes will not impact it. The MinGW build should be the same and hopefully Andy can help with it. I would like to do it to the 5.2-patches branch and main and maybe 5.1-patches if needed.

Alex

As I stated earlier I would have to respectfully object to requiring the SDK for all Windows hosted toolchains. As far as I know Net-SNMP builds fine on Cygwin without the SDK, as it does with MinGW. Before I would vote for changing the MinGW build requirements I would have to see a true benefit from doing so. What has been presented to far has not convinced me that it should be a requirement.

You are correct that there is no need for the SDK with MinGW or Cygwin. I checked the MinGW includes folder (c:\MinGW\include) and I found wProductType in winnt.h, SOCKLEN_T ws2tcpip.h and iphlpapi.h. It looks like the SDK components are in MinGW and I would assume Cygwin.


So this means it's only MSVC that we need to worry about. Basically MSVC with PSDK is equivalent to MinGW and Cygwin.

So the question is changed to: Does anyone object to making the SDK a requirement when compiling with MSVC?

Alex




Andy


Alex Burger wrote:


Hi Andy.

There are now two known issues with compiling 5.2 without the SDK installed.

The first is that win32\net-snmp\net-snmp-config.h contains:

#define HAVE_SOCKLEN_T 1

which should only be defined if the Platform SDK is installed.

The second is in agent\mibgroup\mibII\system_mib.c. wProductType is defined in the PSDK WinNT.h file for _OSVERSIONINFOEXA and _OSVERSIONINFOEXW but not in the standard WINBASE.H file included in MSVC.

I think we need to be able to detect if PSDK is installed. Do you know of a way to do this? I looked through the header files trying to find a 'PSDK' define of some sort, but I couldn't find any. I don't really want to just look for some random define that is only defined in the SDK as that could be unreliable and could break in the future.

If we can not automate it, then I think the only alternative is to add a define to net-snmp-config.h such as HAVE_WIN32_PLATFORM_SDK. This is currently defined on the command line when compiling the projects snmpdsdk and netsnmpmibssdk. Using the command line define could solve the second problem as the system_mib.c file is part of netsnmpmibssdk, but it does not help with HAVE_SOCKLEN_T so it would have to go in to net-snmp-config.h.

Adding the define to net-snmp-config.h could be automated when using the build.bat system, MinGW or Cygwin. Users compiling with the MSVC GUI would have to do it manually.

Does MinGW detect and use the PSDK?

Alex





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to