I'd like to use NetSNMP with wxDevC++.
I created a DevPack with the precompiled libraries and the include directories
i got from the binaries of the Net-SNMP 5.4 release (the file
net-snmp-5.4.0-1.win32.exe that can be downloaded here:
http://net-snmp.sourceforge.net/download.html ).
After a little bit of "tuning" (i had to make a few modifications to
net-snmp-config.h) i succeded in compiling a NetSNMP example.
The problem now is that I noticed that I can't link the netsnmptrapd library
(netsnmptrapd.lib).
With the other snmp libraries everything works fine but when I try to link
netsnmptrapd.lib i get this compiler errors:
Compiler: Default GCC compiler
Building Makefile: "C:\examples\Prove\Backup\Makefile.win"
Executing make...
mingw32-make.exe -f "C:\examples\Prove\Backup\Makefile.win" all
g++.exe -c ServerTCPApp.cpp -o Objects/MingW/ServerTCPApp.o
-I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
-I"C:/Dev-Cpp/include/c++/3.4.2/backward"
-I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2"
-I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/" -I"C:/Dev-Cpp/include/common/wx/msw"
-I"C:/Dev-Cpp/include/common/wx/generic" -I"C:/Dev-Cpp/include/common/wx/fl"
-I"C:/Dev-Cpp/include/common/wx/gizmos" -I"C:/Dev-Cpp/include/common/wx/html"
-I"C:/Dev-Cpp/include/common/wx/mmedia" -I"C:/Dev-Cpp/include/common/wx/net"
-I"C:/Dev-Cpp/include/common/wx/ogl" -I"C:/Dev-Cpp/include/common/wx/plot"
-I"C:/Dev-Cpp/include/common/wx/protocol" -I"C:/Dev-Cpp/include/common/wx/stc"
-I"C:/Dev-Cpp/include/common/wx/svg" -I"C:/Dev-Cpp/include/common/wx/xml"
-I"C:/Dev-Cpp/include/common/wx/xrc" -I"C:/Dev-Cpp/include/common/wx"
-I"C:/Dev-Cpp/include/common" -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__
-fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__
-D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3g++.exe -c
ServerTCPFrm.cpp -o Objects/MingW/ServerTCPFrm.o
-I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
-I"C:/Dev-Cpp/include/c++/3.4.2/backward"
-I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2"
-I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/" -I"C:/Dev-Cpp/include/common/wx/msw"
-I"C:/Dev-Cpp/include/common/wx/generic" -I"C:/Dev-Cpp/include/common/wx/fl"
-I"C:/Dev-Cpp/include/common/wx/gizmos" -I"C:/Dev-Cpp/include/common/wx/html"
-I"C:/Dev-Cpp/include/common/wx/mmedia" -I"C:/Dev-Cpp/include/common/wx/net"
-I"C:/Dev-Cpp/include/common/wx/ogl" -I"C:/Dev-Cpp/include/common/wx/plot"
-I"C:/Dev-Cpp/include/common/wx/protocol" -I"C:/Dev-Cpp/include/common/wx/stc"
-I"C:/Dev-Cpp/include/common/wx/svg" -I"C:/Dev-Cpp/include/common/wx/xml"
-I"C:/Dev-Cpp/include/common/wx/xrc" -I"C:/Dev-Cpp/include/common/wx"
-I"C:/Dev-Cpp/include/common" -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__
-fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__
-D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3windres.exe
--input-format=rc -o Objects/MingW/ServerTCP_private.res --include-dir
"C:/Dev-Cpp/include/common" Objects/MingW/SERVER~1.RC -O coffg++.exe
Objects/MingW/ServerTCPApp.o Objects/MingW/ServerTCPFrm.o
Objects/MingW/ServerTCP_private.res -o "Output\MingW\ServerTCP.exe"
-L"C:/Dev-Cpp/Lib" -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmptrapd
-lnetsnmp -mwindows -lwxmsw28 -lwxmsw28_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib
-lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm
-lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
-lodbc32 -lopengl32 Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_term_handler]+0x1):
undefined reference to
`main_session'C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_term_handler]+0x7):
undefined reference to `netsnmp_running'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x1cf):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x1ed):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x20b):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x23e):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x275):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x2a7):
more undefined references to `_imp__optarg' follow
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x2cd):
undefined reference to `add_to_init_list'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x2f6):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x357):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x379):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x3bb):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x3db):
undefined reference to `_imp__optarg'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x3f1):
more undefined references to `_imp__optarg' follow
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x4d9):
undefined reference to `_imp__optind'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x59c):
undefined reference to `init_agent'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x7b9):
undefined reference to `init_agent'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x7be):
undefined reference to `subagent_init'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x7c8):
undefined reference to `register_snmpEngine_scalars_context'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x7d7):
undefined reference to `init_register_usmUser_context'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x831):
undefined reference to
`netsnmp_running'C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0x980):
undefined reference to `netsnmp_running'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0xba7):
undefined reference to `netsnmp_running'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_SnmpTrapdMain]+0xbb2):
undefined reference to `netsnmp_running'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd.obj):..\..\apps\snmptra:(.text[_trapd_update_config]+0xe):
undefined reference to `vacm_standard_views'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd_handlers.obj):..\..\apps\snmptra:(.text[_command_handler]+0x108):
undefined reference to
`convert_v1pdu_to_v2'C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd_handlers.obj):..\..\apps\snmptra:(.text[_command_handler]+0x27a):
undefined reference to `run_shell_command'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd_handlers.obj):..\..\apps\snmptra:(.text[_axforward_handler]+0x9):
undefined reference to `send_v2trap'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd_auth.obj):..\..\apps\snmptra:(.text[_init_netsnmp_trapd_auth]+0x14):
undefined reference to `init_vacm_config_tokens'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd_auth.obj):..\..\apps\snmptra:(.text[_netsnmp_trapd_auth]+0xec):
undefined reference to `convert_v1pdu_to_v2'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/snmptrapd_auth.obj):..\..\apps\snmptra:(.text[_netsnmp_trapd_auth]+0x226):
undefined reference to `vacm_check_view'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/winservice.obj):..\..\snmplib\wins:(.text[_RegisterService]+0x11):
undefined reference to `_except_list'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/winservice.obj):..\..\snmplib\wins:(.text[_RegisterService]+0x19):
undefined reference to `_except_list'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/winservice.obj):..\..\snmplib\wins:(.text[_RegisterService]+0x461):
undefined reference to `_except_list'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/winservice.obj):..\..\snmplib\wins:(.text[_UnregisterService]+0x11):
undefined reference to `_except_list'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/winservice.obj):..\..\snmplib\wins:(.text[_UnregisterService]+0x19):
undefined reference to `_except_list'
C:/Dev-Cpp/Lib\netsnmptrapd.lib(./release/winservice.obj):..\..\snmplib\wins:(.text[_UnregisterService]+0x218):
more undefined references to `_except_list' follow
collect2: ld returned 1 exit status
mingw32-make.exe: *** [Output/MingW/ServerTCP.exe] Error 1Execution terminated
I think that the problem is in:
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
After some searches on the net I think the problem could be that the
netsnmptrapd.lib was compiled with VisualC and because of that I can't link it
using MingW. Is that correct?
How can i solve this problem?
There is a way to compile with MingW only the netsnmptrapd library?
My OS is Windows XP, wxDevC++ is the 6.10.2 version and the compiler is MingW
Thanks and best regards,
Guido
------------------------------------------------------
Scegli infostrada: ADSL gratis per tutta lÂ’estate e telefoni senza canone
Telecom
http://click.libero.it/infostrada
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders