[AGENT++] Snmp++/Agent ++ Link Warning and Errors in Visual C++ 2005

Jean Li-Kam-Tin jean.li-kam-tin at vega.co.uk
Tue Apr 18 12:39:27 CEST 2006


Hi everyone,

I've successfully built all the Agent++ libraries and examples under
Linux using the Makefiles provided. That worked great.

Unfortunately I also need to built the same material under Windows. I'm
using Visual C++ Express 2005 with the MS Platform SDK. When I compile
the static library agent++.lib I get a warning that no public symbols
are found from my OBJ files. I'm not sure if this is really a problem to
worry about - see output below.

However, when I compile the test_app program in the
snmp++/consoleExamples directory I get some major link errors
(...LNK2019: unresolved external symbol...) - see output below. This is
clearly a problem with my build configuration and may be my
config_snmp_pp.h file but I'm not sure what to fix.

Has anyone else seen this before and how did they solve it ?

Thanks & regards,

Jean (<-- it's a French name)


------ Rebuild All started: Project: agent++, Configuration: Debug Win32
------
Deleting intermediate and output files for project 'agent++',
configuration 'Debug|Win32'
Compiling...
vacm.cpp
v3_mib.cpp
tools.cpp
...
Generating Code...
Creating library...
snmp_community_mib.obj : warning LNK4221: no public symbols found;
archive member will be inaccessible
proxy_forwarder.obj : warning LNK4221: no public symbols found; archive
member will be inaccessible
mib_proxy.obj : warning LNK4221: no public symbols found; archive member
will be inaccessible
agentpp_config_mib.obj : warning LNK4221: no public symbols found;
archive member will be inaccessible
Build log was saved at
"file://c:\Projects\SNMP\Agent++\msvc\static\agent++\Debug\BuildLog.htm"
agent++ - 0 error(s), 7 warning(s)
----------------------------------



------ Rebuild All started: Project: example-snmp-test-app,
Configuration: Debug Win32 ------
Deleting intermediate and output files for project
'example-snmp-test-app', configuration 'Debug|Win32'
Compiling...
test_app.cpp
Linking...
test_app.obj : error LNK2019: unresolved external symbol "public: static
void __cdecl Snmp_pp::Snmp::socket_cleanup(void)"
(?socket_cleanup at Snmp@Snmp_pp@@SAXXZ) referenced in function _main
test_app.obj : error LNK2019: unresolved external symbol "public:
virtual int __thiscall Snmp_pp::Snmp::trap(class Snmp_pp::Pdu &,class
Snmp_pp::SnmpTarget const &)"
(?trap at Snmp@Snmp_pp@@UAEHAAVPdu at 2@ABVSnmpTarget at 2@@Z) referenced in
function _main
test_app.obj : error LNK2019: unresolved external symbol "public: int
__thiscall Snmp_pp::Pdu::get_vb(class Snmp_pp::Vb &,int)const "
(?get_vb at Pdu@Snmp_pp@@QBEHAAVVb at 2@H at Z) referenced in function _main
...
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
LINK : error LNK2001: unresolved external symbol __load_config_used
C:\Projects\SNMP\Agent++\msvc\Debug\example-snmp-test-app.exe : fatal
error LNK1120: 86 unresolved externals
Build log was saved at
"file://c:\Projects\SNMP\Agent++\msvc\example-snmp-test-app\Debug\BuildL
og.htm"
example-snmp-test-app - 87 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========









More information about the AGENTPP mailing list