Re: Compiling NetSNMP for x64 Windows
Xiang Li <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, > > .... > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\amd64, > > Also copy the "openssl" header files folder as you would do for 32-bit > builds. > After that the build should work. > > > Thanks for the feedback - I'll update README.win32. But I'll document > to copy the OpenSSL binaries in a separate directory instead of the > Visual Studio directories. > That would be even better. Copying openssl headers/libs to VC++ directory is just the old instructions I followed (in netsnmp win32 readme file I believe). If we do that I suppose the perl configuration scripts will have additional options to tell where opensssl header files and lib are located? > For a "static" build, unless you add linking with "Gdi32.lib", > the build > > will fail with link errors. For a "static" build, NETSNMP-5.5 is > linked with > Gdi32.lib but netsnmp-5.6.1 and 5.5.1 are NOT! This appears to be > a bug. > > > I haven't seen this error message yet. With which configuration > options did this occur ? > I looked at this issue again closely. I am using the following configuration options: perl configure --config=release --with-sdk --linktype=static --prefix=c:/net-snmp-5.6.1-x64 --with-ssl --with-winextdll --with-ipv6 I think the reason why you haven't seen this error is likely because the "different" openssl libs from slproweb are used in my "static" build. For a "static" build, I use the "static" openssl libs found in the "VC/static" folder: C:\OpenSSL-1.0.0.c-Win64\lib\VC\static\libeay32MT.lib and C:\OpenSSL-1.0.0.c-Win64\lib\VC\static\libeay32MD.lib This way the generated net-snmp binaries will be statically linked to openssl. For this "static" build if we still use C:\OpenSSL-1.0.0.c-Win64\lib\VC\libeay32MT.lib and C:\OpenSSL-1.0.0.c-Win64\lib\VC\libeay32MD.lib There won't be any errors but I think this is not what I need, because the generated netsnmp binaries still depend on openSSL DLLs installed in the system folder of end users' computer. Depending on the your intention for how net-snmp binary should work this may not be an issuer. However In NET-SNMP5.5 even when I use static openssl libraries to build the "static" net-snmp no errors were reported. By comparing the difference we found the "GDI32.lib" reference is removed in net-snmp 5.5.1 and 5.6.1. We ended up adding it back in "win32\net-snmp\net-snmp-config.h.in" for a "static" build. I tend to think we should "fix" it. Adding a link to "Gdi32.lib" won't affect "dynamic" build but will make the errors go away when doing a static build using static openssl libs. Best regards, -- Xiang Li http://www.champnms.com ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users