Home › Forums › Discussions › Support › Developing a forwarding application › Re: Re: Developping a forwarding application
About the 3g modem I can’t test it now but I remember I established the connection before to test and it didn’t appear in the list… It’s a particular modem that works in VPN mode only, does that change a thing ?
About the build, I tried to build the library with my own compiler :
g++ -c *.cpp
ar -rc ndisapi.a *.o
ar s ndisapi.a
ren ndisapi.a ndisapi.lib
Got the following errors when trying to build my program using this library :
g++ -o ip_forward *.o -lndisapi
main.o(.text+0x9c):main.cc: undefined reference to `_imp___ZN8CNdisApiC1EPKc’
D:/Utilitaires/Programmation/MinGW/bin/../lib/gcc-lib/mingw32/3.3.1/../../..ndi
sapi.lib(ndisapi.o.b)(.text+0x3c):ndisapi.cpp: undefined reference to `_imp___ZT
V8CNdisApi’
D:/Utilitaires/Programmation/MinGW/bin/../lib/gcc-lib/mingw32/3.3.1/../../..ndi
sapi.lib(ndisapi.o.b)(.text+0x1e8):ndisapi.cpp: undefined reference to `_imp___Z
TV8CNdisApi’
D:/Utilitaires/Programmation/MinGW/bin/../lib/gcc-lib/mingw32/3.3.1/../../..ndi
sapi.lib(ndisapi.o.b)(.text+0x391):ndisapi.cpp: undefined reference to `_imp___Z
TV8CNdisApi’
D:/Utilitaires/Programmation/MinGW/bin/../lib/gcc-lib/mingw32/3.3.1/../../..ndi
sapi.lib(ndisapi.o.b)(.text+0x3f3):ndisapi.cpp: undefined reference to `_imp___Z
TV8CNdisApi’
D:/Utilitaires/Programmation/MinGW/bin/../lib/gcc-lib/mingw32/3.3.1/../../..ndi
sapi.lib(ndisapi.o.b)(.text+0x455):ndisapi.cpp: undefined reference to `_imp___Z
TV8CNdisApi’
If I copy the dll file already build into the lib folder, it gives me :
main.o(.text+0x26):main.cc: undefined reference to `GetDriverVersion@4′
main.o(.text+0x9c):main.cc: undefined reference to `_imp___ZN8CNdisApiC1EPKc’
main.o(.text+0xb9):main.cc: undefined reference to `CNdisApi::~CNdisApi()’
Now I try to build the dll on my own, but same errors again :
g++ -shared ndisapi.o -o ndisapi.dll
ndisapi.o(.text+0x3c):ndisapi.cpp: undefined reference to `_imp___ZTV8CNdisApi’
ndisapi.o(.text+0x1e8):ndisapi.cpp: undefined reference to `_imp___ZTV8CNdisApi’
ndisapi.o(.text+0x391):ndisapi.cpp: undefined reference to `_imp___ZTV8CNdisApi’
ndisapi.o(.text+0x3f3):ndisapi.cpp: undefined reference to `_imp___ZTV8CNdisApi’
ndisapi.o(.text+0x455):ndisapi.cpp: undefined reference to `_imp___ZTV8CNdisApi’
What am I missing ?