cisco anyconnect client api compile problems

Hi,

i try to compile die vpnapi example from the cisco anyconnect client api 2.5
i use debian lenny to compile but have several problems

here are the files out auf the archive:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
vpnapi/
vpnapi/examples/
vpnapi/examples/cli/
vpnapi/examples/cli/CLIClientImpl.cpp
vpnapi/examples/cli/CLIClientImpl.h
vpnapi/examples/cli/CLIClientMain.cpp
vpnapi/examples/cli/linux_x86.mak
vpnapi/include/
vpnapi/include/api.h
vpnapi/include/ClientIfc.h
vpnapi/include/ClientIfcBase.h
vpnapi/include/ConnectPromptInfo.h
vpnapi/include/ConnectPromptInfoBase.h
vpnapi/include/Preference.h
vpnapi/include/PreferenceBase.h
vpnapi/include/PreferenceInfo.h
vpnapi/include/PreferenceInfoBase.h
vpnapi/include/PreferenceUpdate.h
vpnapi/include/PromptEntry.h
vpnapi/include/PromptEntryBase.h
vpnapi/include/ProtocolInfo.h
vpnapi/include/RouteInfo.h
vpnapi/include/VPNStats.h
vpnapi/include/VPNStatsBase.h
vpnapi/include/FirewallInfo.h
vpnapi/include/GlobalEnums.h
vpnapi/lib/
vpnapi/lib/Linux/
vpnapi/lib/Linux/Intel/
vpnapi/lib/Linux/Intel/libcommon.a
vpnapi/lib/Linux/Intel/libvpnapi.a
vpnapi/lib/Linux/Intel/libcommoncrypt.a
vpnapi/lib/Linux/Intel/libcurl.a
vpnapi/lib/Linux/Intel/libssl.so.0.9.8
vpnapi/lib/Linux/Intel/libcrypto.so.0.9.8


i renamed the linux_x86.mak in Makefile an run make

the compiler says the following:

1
2
3
4
5
# make
g++ -DHAVE_CONFIG_H -D_NOEXPORTDLL -g -O0 -Wall -I. -I../../include -I/usr/include/libxml2   -c -o CLIClientMain.o CLIClientMain.cpp
CLIClientMain.cpp: In function ‘int main(int, char**)’:
CLIClientMain.cpp:43: error: ‘exit’ was not declared in this scope
make: *** [CLIClientMain.o] Fehler 1


hmmm - the 2.4 version of the example compiled clean in the past :-/
i added a #include <stdlib.h> in CLIClientMain.cpp and try again...

1
2
3
4
5
6
# make
g++ -DHAVE_CONFIG_H -D_NOEXPORTDLL -g -O0 -Wall -I. -I../../include -I/usr/include/libxml2   -c -o CLIClientMain.o CLIClientMain.cpp
g++ -DHAVE_CONFIG_H -D_NOEXPORTDLL -g -O0 -Wall -I. -I../../include -I/usr/include/libxml2   -c -o CLIClientImpl.o CLIClientImpl.cpp
CLIClientImpl.cpp: In member function ‘std::wstring CLIClientImpl::convertMultiByteToWide(const std::string&)’:
CLIClientImpl.cpp:356: error: ‘mbstowcs’ was not declared in this scope
make: *** [CLIClientImpl.o] Fehler 1


i added the #include <stdlib.h> in CLIClientImpl.cpp and try again...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
g++ -DHAVE_CONFIG_H -D_NOEXPORTDLL -g -O0 -Wfatal-errors -I. -I../../include -I/usr/include/libxml2   -c -o CLIClientMain.o CLIClientMain.cpp
g++ -DHAVE_CONFIG_H -D_NOEXPORTDLL -g -O0 -Wfatal-errors -I. -I../../include -I/usr/include/libxml2   -c -o CLIClientImpl.o CLIClientImpl.cpp
compiling client
g++ -DHAVE_CONFIG_H -D_NOEXPORTDLL -g -O0 -Wfatal-errors -I. -I../../include -I/usr/include/libxml2 -g -I. -I../../include -I/usr/include/libxml2 -L../../lib/Linux/Intel
../../lib/Linux/Intel/libvpnapi.a(ConnectPromptInfo.o): In function `ConnectPromptInfo::ConnectPromptInfo(std::basic_string<char, std::char_traits<char>, std::allocator<c
ConnectPromptInfo.cpp:(.text+0x6e): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
ConnectPromptInfo.cpp:(.text+0xb6): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
../../lib/Linux/Intel/libvpnapi.a(ConnectPromptInfo.o): In function `ConnectPromptInfo::ConnectPromptInfo(std::basic_string<char, std::char_traits<char>, std::allocator<c
ConnectPromptInfo.cpp:(.text+0x14e): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
ConnectPromptInfo.cpp:(.text+0x196): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
../../lib/Linux/Intel/libvpnapi.a(ConnectPromptInfoBase.o): In function `ConnectPromptInfoBase::ConnectPromptInfoBase(std::basic_string<char, std::char_traits<char>, std:
ConnectPromptInfoBase.cpp:(.text+0x13): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
ConnectPromptInfoBase.cpp:(.text+0x25): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
ConnectPromptInfoBase.cpp:(.text+0x2f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
ConnectPromptInfoBase.cpp:(.text+0x13c): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
ConnectPromptInfoBase.cpp:(.text+0x154): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
ConnectPromptInfoBase.cpp:(.text+0x182): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
ConnectPromptInfoBase.cpp:(.text+0x1b2): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
ConnectPromptInfoBase.cpp:(.text+0x1cf): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
...
...
...


now i get much feedback about undefined references ...
could anyone give me a hint - i don't know what is missing ...
Topic archived. No new replies allowed.