Net-SNMP-5.9 Error when compiling with Visual Studio 2005

Christophe CASSIGNOL <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi everyone,

I am trying to compile the latest Net-SNMP-5.9 with Visual Studio 2005 
but I have an error :

snmpUDPBaseDomain.c
..\..\snmplib\transports\snmpUDPBaseDomain.c(540) : error C2143: syntax 
error : missing ';' before 'type'
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2275: 'GUID' 
: illegal use of this type as an expression
         C:\Program Files\Microsoft\Visual Studio 
8\VC\PlatformSDK\include\guiddef.h(27) : see declaration of 'GUID'
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2146: syntax 
error : missing ';' before identifier 'WSARecvMsgGuid'
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2065: 
'WSARecvMsgGuid' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2059: syntax 
error : '{'
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2275: 'GUID' 
: illegal use of this type as an expression
         C:\Program Files\Microsoft\Visual Studio 
8\VC\PlatformSDK\include\guiddef.h(27) : see declaration of 'GUID'
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2146: syntax 
error : missing ';' before identifier 'WSASendMsgGuid'
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2065: 
'WSASendMsgGuid' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2059: syntax 
error : '{'
..\..\snmplib\transports\snmpUDPBaseDomain.c(543) : error C2275: 'DWORD' 
: illegal use of this type as an expression
         C:\Program Files\Microsoft\Visual Studio 
8\VC\PlatformSDK\include\windef.h(151) : see declaration of 'DWORD'
..\..\snmplib\transports\snmpUDPBaseDomain.c(543) : error C2146: syntax 
error : missing ';' before identifier 'nbytes'
..\..\snmplib\transports\snmpUDPBaseDomain.c(543) : error C2065: 
'nbytes' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(544) : error C2143: syntax 
error : missing ';' before 'type'
..\..\snmplib\transports\snmpUDPBaseDomain.c(546) : error C2065: 's' : 
undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(548) : error C2065: 
'result' : undeclared identifier

Any ideas ?

With Net-SNMP-5.8, I don't have this error.

Best Regards
Christophe

_______________________________________________
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
make.out (text/plain, 13.2 KB)
	cd libagent
	nmake /nologo all
	cl.exe /I.. /I..\..\include /I..\..\agent\mibgroup /D NETSNMP_REMOVE_U64 /D VC_EXTRALEAN /D WIN32 /D _CONSOLE /D _CRT_NONSTDC_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D _MBCS /D _WIN32_WINNT=0xffff /D _WINSOCK_DEPRECATED_NO_WARNINGS /D WIN32_LEAN_AND_MEAN /EHsc /FD /FR.\release\ /Fd.\release\libagent.pdb /Fo.\release\ /I D:\Sources\AES\openssl-1.1.1i\include   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields  -I"C:\Perl\lib\CORE"  /c /W3 /Zi /nologo /MD  /D NDEBUG /O2 ..\..\agent\agent_handler.c ..\..\agent\agent_index.c ..\..\agent\agent_read_config.c ..\..\agent\agent_registry.c ..\..\agent\agent_sysORTable.c ..\..\agent\agent_trap.c ..\..\agent\kernel.c ..\..\agent\snmp_agent.c ..\..\agent\snmp_vars.c 
cl : Command line warning D9002 : ignoring unknown option '-s'
cl : Command line warning D9002 : ignoring unknown option '-fwrapv'
cl : Command line warning D9002 : ignoring unknown option '-fno-strict-aliasing'
cl : Command line warning D9002 : ignoring unknown option '-mms-bitfields'
agent_handler.c
agent_index.c
agent_read_config.c
agent_registry.c
agent_sysORTable.c
agent_trap.c
kernel.c
snmp_agent.c
snmp_vars.c
D:\Sources\AES\net-snmp-5.9\win32\agent_module_inits.h(3) : warning C4013: 'init_iquery' undefined; assuming extern returning int
Generating Code...
	cl.exe /I.. /I..\..\include /I..\..\agent\mibgroup /D NETSNMP_REMOVE_U64 /D VC_EXTRALEAN /D WIN32 /D _CONSOLE /D _CRT_NONSTDC_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D _MBCS /D _WIN32_WINNT=0xffff /D _WINSOCK_DEPRECATED_NO_WARNINGS /D WIN32_LEAN_AND_MEAN /EHsc /FD /FR.\release\ /Fd.\release\libagent.pdb /Fo.\release\ /I D:\Sources\AES\openssl-1.1.1i\include   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields  -I"C:\Perl\lib\CORE"  /c /W3 /Zi /nologo /MD  /D NDEBUG /O2 ..\..\agent\helpers\all_helpers.c ..\..\agent\helpers\baby_steps.c ..\..\agent\helpers\bulk_to_next.c ..\..\agent\helpers\cache_handler.c ..\..\agent\helpers\debug_handler.c ..\..\agent\helpers\instance.c ..\..\agent\helpers\mode_end_call.c ..\..\agent\helpers\multiplexer.c ..\..\agent\helpers\null.c ..\..\agent\helpers\old_api.c ..\..\agent\helpers\read_only.c ..\..\agent\helpers\row_merge.c ..\..\agent\helpers\scalar.c ..\..\agent\helpers\scalar_group.c ..\..\agent\helpers\serialize.c ..\..\agent\helpers\snmp_get_statistic.c ..\..\agent\helpers\stash_cache.c ..\..\agent\helpers\stash_to_next.c ..\..\agent\helpers\table.c ..\..\agent\helpers\table_array.c ..\..\agent\helpers\table_container.c ..\..\agent\helpers\table_data.c ..\..\agent\helpers\table_dataset.c ..\..\agent\helpers\table_iterator.c ..\..\agent\helpers\table_tdata.c ..\..\agent\helpers\watcher.c 
cl : Command line warning D9002 : ignoring unknown option '-s'
cl : Command line warning D9002 : ignoring unknown option '-fwrapv'
cl : Command line warning D9002 : ignoring unknown option '-fno-strict-aliasing'
cl : Command line warning D9002 : ignoring unknown option '-mms-bitfields'
all_helpers.c
baby_steps.c
bulk_to_next.c
cache_handler.c
debug_handler.c
instance.c
mode_end_call.c
multiplexer.c
null.c
old_api.c
read_only.c
row_merge.c
scalar.c
scalar_group.c
serialize.c
snmp_get_statistic.c
stash_cache.c
stash_to_next.c
table.c
table_array.c
Generating Code...
Compiling...
table_container.c
table_data.c
table_dataset.c
table_iterator.c
table_tdata.c
watcher.c
Generating Code...
	link.exe -lib /nologo /out:"..\lib\.\release\netsnmpagent.lib" /libpath:D:\Sources\AES\openssl-1.1.1i\lib\Release_Shared /MANIFEST:EMBED  ".\release\agent_handler.obj"  ".\release\agent_index.obj"  ".\release\agent_read_config.obj"  ".\release\agent_registry.obj"  ".\release\agent_sysORTable.obj"  ".\release\agent_trap.obj"  ".\release\all_helpers.obj"  ".\release\baby_steps.obj"  ".\release\bulk_to_next.obj"  ".\release\cache_handler.obj"  ".\release\debug_handler.obj"  ".\release\instance.obj"  ".\release\kernel.obj"  ".\release\mode_end_call.obj"  ".\release\multiplexer.obj"  ".\release\null.obj"  ".\release\old_api.obj"  ".\release\read_only.obj"  ".\release\row_merge.obj"  ".\release\scalar.obj"  ".\release\scalar_group.obj"  ".\release\serialize.obj"  ".\release\snmp_agent.obj"  ".\release\snmp_get_statistic.obj"  ".\release\snmp_vars.obj"  ".\release\stash_cache.obj"  ".\release\stash_to_next.obj"  ".\release\table.obj"  ".\release\table_array.obj"  ".\release\table_container.obj"  ".\release\table_data.obj"  ".\release\table_dataset.obj"  ".\release\table_iterator.obj"  ".\release\table_tdata.obj"  ".\release\watcher.obj"
LINK : warning LNK4044: unrecognized option '/MANIFEST:EMBED'; ignored
	cd ..
	cd libsnmp_dll
	nmake /nologo all
	cl.exe /I.. /I..\..\snmplib /I..\..\include /D NETSNMP_DLL /D NETSNMP_REMOVE_U64 /D VC_EXTRALEAN /D WIN32 /D _CONSOLE /D _CRT_NONSTDC_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D _MBCS /D _WIN32_WINNT=0xffff /D _WINSOCK_DEPRECATED_NO_WARNINGS /D WIN32_LEAN_AND_MEAN /EHsc /FD /FR.\release\ /Fd.\release\libsnmp_dll.pdb /Fo.\release\ /I D:\Sources\AES\openssl-1.1.1i\include   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields  -I"C:\Perl\lib\CORE"  /c /W3 /Zi /nologo /MD  /D NDEBUG /O2 ..\..\snmplib\asn1.c ..\..\snmplib\asprintf.c ..\..\snmplib\callback.c ..\..\snmplib\cert_util.c ..\..\snmplib\check_varbind.c ..\..\snmplib\closedir.c ..\..\snmplib\container.c ..\..\snmplib\container_binary_array.c ..\..\snmplib\container_iterator.c ..\..\snmplib\container_list_ssll.c ..\..\snmplib\container_null.c ..\..\snmplib\data_list.c ..\..\snmplib\default_store.c ..\..\snmplib\dir_utils.c ..\..\snmplib\fd_event_manager.c ..\..\snmplib\file_utils.c ..\..\snmplib\getopt.c ..\..\snmplib\gettimeofday.c ..\..\snmplib\inet_ntop.c ..\..\snmplib\inet_pton.c ..\..\snmplib\int64.c ..\..\snmplib\keytools.c ..\..\snmplib\large_fd_set.c ..\..\snmplib\lcd_time.c ..\..\snmplib\md5.c ..\..\snmplib\mib.c ..\..\snmplib\mt_support.c ..\..\snmplib\oid_stash.c ..\..\snmplib\opendir.c ..\..\snmplib\parse.c ..\..\snmplib\read_config.c ..\..\snmplib\readdir.c ..\..\snmplib\scapi.c ..\..\snmplib\snmp-tc.c ..\..\snmplib\snmp.c ..\..\snmplib\snmp_alarm.c ..\..\snmplib\snmp_api.c ..\..\snmplib\snmp_auth.c ..\..\snmplib\snmp_client.c ..\..\snmplib\snmp_debug.c ..\..\snmplib\snmp_enum.c ..\..\snmplib\snmp_logging.c ..\..\snmplib\snmp_parse_args.c ..\..\snmplib\snmp_secmod.c ..\..\snmplib\snmp_service.c ..\..\snmplib\snmp_transport.c ..\..\snmplib\snmp_version.c ..\..\snmplib\snmptsm.c ..\..\snmplib\snmpusm.c ..\..\snmplib\snmpv3.c ..\..\snmplib\strlcat.c ..\..\snmplib\strlcpy.c ..\..\snmplib\strtok_r.c ..\..\snmplib\strtoull.c ..\..\snmplib\system.c ..\..\snmplib\tools.c ..\..\snmplib\ucd_compat.c ..\..\snmplib\vacm.c ..\..\snmplib\winpipe.c ..\..\snmplib\snmp_openssl.c 
cl : Command line warning D9002 : ignoring unknown option '-s'
cl : Command line warning D9002 : ignoring unknown option '-fwrapv'
cl : Command line warning D9002 : ignoring unknown option '-fno-strict-aliasing'
cl : Command line warning D9002 : ignoring unknown option '-mms-bitfields'
asn1.c
asprintf.c
callback.c
cert_util.c
check_varbind.c
closedir.c
container.c
container_binary_array.c
container_iterator.c
container_list_ssll.c
container_null.c
data_list.c
default_store.c
dir_utils.c
fd_event_manager.c
file_utils.c
getopt.c
gettimeofday.c
inet_ntop.c
inet_pton.c
Generating Code...
Compiling...
int64.c
keytools.c
large_fd_set.c
lcd_time.c
md5.c
mib.c
..\..\snmplib\mib.c(4051) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4052) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4053) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4054) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4081) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4082) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4083) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
..\..\snmplib\mib.c(4084) : warning C4244: '=' : conversion from 'const oid' to 'unsigned char', possible loss of data
mt_support.c
oid_stash.c
opendir.c
parse.c
read_config.c
readdir.c
scapi.c
snmp-tc.c
snmp.c
snmp_alarm.c
snmp_api.c
snmp_auth.c
snmp_client.c
snmp_debug.c
Generating Code...
Compiling...
snmp_enum.c
snmp_logging.c
snmp_parse_args.c
snmp_secmod.c
snmp_service.c
snmp_transport.c
snmp_version.c
snmptsm.c
snmpusm.c
snmpv3.c
strlcat.c
strlcpy.c
strtok_r.c
strtoull.c
system.c
tools.c
..\..\snmplib\tools.c(993) : warning C4244: '=' : conversion from 'uint64_t' to 'long', possible loss of data
..\..\snmplib\tools.c(994) : warning C4244: '=' : conversion from 'uint64_t' to 'long', possible loss of data
ucd_compat.c
vacm.c
winpipe.c
snmp_openssl.c
Generating Code...
	cl.exe /I.. /I..\..\snmplib /I..\..\include /D NETSNMP_DLL /D NETSNMP_REMOVE_U64 /D VC_EXTRALEAN /D WIN32 /D _CONSOLE /D _CRT_NONSTDC_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D _MBCS /D _WIN32_WINNT=0xffff /D _WINSOCK_DEPRECATED_NO_WARNINGS /D WIN32_LEAN_AND_MEAN /EHsc /FD /FR.\release\ /Fd.\release\libsnmp_dll.pdb /Fo.\release\ /I D:\Sources\AES\openssl-1.1.1i\include   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields  -I"C:\Perl\lib\CORE"  /c /W3 /Zi /nologo /MD  /D NDEBUG /O2 ..\..\snmplib\transports\snmpCallbackDomain.c ..\..\snmplib\transports\snmpIPBaseDomain.c ..\..\snmplib\transports\snmpIPv4BaseDomain.c ..\..\snmplib\transports\snmpSocketBaseDomain.c ..\..\snmplib\transports\snmpTCPBaseDomain.c ..\..\snmplib\transports\snmpTCPDomain.c ..\..\snmplib\transports\snmpUDPBaseDomain.c ..\..\snmplib\transports\snmpUDPDomain.c ..\..\snmplib\transports\snmpUDPIPv4BaseDomain.c ..\..\snmplib\transports\snmpIPv6BaseDomain.c ..\..\snmplib\transports\snmpTCPIPv6Domain.c ..\..\snmplib\transports\snmpUDPIPv6Domain.c ..\..\snmplib\transports\snmpDTLSUDPDomain.c ..\..\snmplib\transports\snmpTLSBaseDomain.c ..\..\snmplib\transports\snmpTLSTCPDomain.c 
cl : Command line warning D9002 : ignoring unknown option '-s'
cl : Command line warning D9002 : ignoring unknown option '-fwrapv'
cl : Command line warning D9002 : ignoring unknown option '-fno-strict-aliasing'
cl : Command line warning D9002 : ignoring unknown option '-mms-bitfields'
snmpCallbackDomain.c
snmpIPBaseDomain.c
snmpIPv4BaseDomain.c
snmpSocketBaseDomain.c
snmpTCPBaseDomain.c
snmpTCPDomain.c
snmpUDPBaseDomain.c
..\..\snmplib\transports\snmpUDPBaseDomain.c(540) : error C2143: syntax error : missing ';' before 'type'
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2275: 'GUID' : illegal use of this type as an expression
        C:\Program Files\Microsoft\Visual Studio 8\VC\PlatformSDK\include\guiddef.h(27) : see declaration of 'GUID'
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2146: syntax error : missing ';' before identifier 'WSARecvMsgGuid'
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2065: 'WSARecvMsgGuid' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(541) : error C2059: syntax error : '{'
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2275: 'GUID' : illegal use of this type as an expression
        C:\Program Files\Microsoft\Visual Studio 8\VC\PlatformSDK\include\guiddef.h(27) : see declaration of 'GUID'
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2146: syntax error : missing ';' before identifier 'WSASendMsgGuid'
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2065: 'WSASendMsgGuid' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(542) : error C2059: syntax error : '{'
..\..\snmplib\transports\snmpUDPBaseDomain.c(543) : error C2275: 'DWORD' : illegal use of this type as an expression
        C:\Program Files\Microsoft\Visual Studio 8\VC\PlatformSDK\include\windef.h(151) : see declaration of 'DWORD'
..\..\snmplib\transports\snmpUDPBaseDomain.c(543) : error C2146: syntax error : missing ';' before identifier 'nbytes'
..\..\snmplib\transports\snmpUDPBaseDomain.c(543) : error C2065: 'nbytes' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(544) : error C2143: syntax error : missing ';' before 'type'
..\..\snmplib\transports\snmpUDPBaseDomain.c(546) : error C2065: 's' : undeclared identifier
..\..\snmplib\transports\snmpUDPBaseDomain.c(548) : error C2065: 'result' : undeclared identifier
snmpUDPDomain.c
snmpUDPIPv4BaseDomain.c
snmpIPv6BaseDomain.c
snmpTCPIPv6Domain.c
snmpUDPIPv6Domain.c
snmpDTLSUDPDomain.c
snmpTLSBaseDomain.c
snmpTLSTCPDomain.c
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft\Visual Studio 8\VC\BIN\cl.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft\Visual Studio 8\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.