PDA

View Full Version : [ubuntu] Getting errors compiling application



qhedberg
February 6th, 2012, 07:13 AM
I am trying to compile an application on ubuntu server, but it keeps failing. This is the return:

c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c acl.cpp -o .objs/acl.o
c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c gre.cpp -o .objs/gre.o
gre.cpp: In member function ‘void Proxy::greThread()’:
gre.cpp:38: error: ‘memset’ was not declared in this scope
gre.cpp:121: error: ‘memcpy’ was not declared in this scope
make: *** [.objs/gre.o] Error 1
c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c link.cpp -o .objs/link.o
acl.cpp: In member function ‘void Proxy::addACL(char*)’:
acl.cpp:21: error: ‘strdup’ was not declared in this scope
make: *** [.objs/acl.o] Error 1
c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c log.cpp -o .objs/log.o
link.cpp: In constructor ‘Proxy::Link::Link(Proxy*, int)’:
link.cpp:107: error: ‘memset’ was not declared in this scope
link.cpp: In member function ‘bool Proxy::Link::tcpPacket(bool)’:
link.cpp:306: error: ‘memset’ was not declared in this scope
link.cpp:310: error: ‘strcmp’ was not declared in this scope
link.cpp:330: error: ‘strcpy’ was not declared in this scope
make: *** [.objs/link.o] Error 1
c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c options.cpp -o .objs/options.o
log.cpp: In member function ‘void Proxy::fail(const char*, int32_t, const char*, bool, const char*, const char*, ...)’:
log.cpp:140: error: ‘strerror’ was not declared in this scope
log.cpp:168: error: ‘exit’ was not declared in this scope
make: *** [.objs/log.o] Error 1
c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c pairs.cpp -o .objs/pairs.o
options.cpp: In function ‘void help(bool)’:
options.cpp:44: error: ‘exit’ was not declared in this scope
options.cpp: In member function ‘void Proxy::options(char**)’:
options.cpp:71: error: ‘exit’ was not declared in this scope
options.cpp:94: warning: deprecated conversion from string constant to ‘char*’
pairs.cpp: In member function ‘bool Proxy::parseAddress(uint32_t*, uint32_t*, const char*)’:
pairs.cpp:21: error: ‘strdup’ was not declared in this scope
pairs.cpp:37: error: ‘free’ was not declared in this scope
pairs.cpp:44: error: ‘free’ was not declared in this scope
pairs.cpp: In member function ‘void Proxy::addProxyPair(char*)’:
pairs.cpp:63: error: ‘strdup’ was not declared in this scope
make: *** [.objs/options.o] Error 1
pairs.cpp: In constructor ‘Proxy::Pair::Pair(Proxy*, const char*, uint32_t, uint32_t, const char*, uint32_t, uint32_t)’:
pairs.cpp:204: error: ‘memset’ was not declared in this scope
c++ -MD -I. -g0 -O6 -Winline -fno-check-new -fno-exceptions -fomit-frame-pointer -fexpensive-optimizations -c utils.cpp -o .objs/utils.o
make: *** [.objs/pairs.o] Error 1
utils.cpp: In member function ‘bool Proxy::resolve(uint32_t*, const char*, bool)’:
utils.cpp:33: error: ‘sscanf’ was not declared in this scope
utils.cpp: In member function ‘void Proxy::daemonize()’:
utils.cpp:132: error: ‘exit’ was not declared in this scope
utils.cpp:138: error: ‘exit’ was not declared in this scope
make: *** [.objs/utils.o] Error 1
make: Target `all' not remade because of errors.

Does anybody know what is going wrong and how to fix it?

shumifan50
February 7th, 2012, 02:18 AM
How long have you been programming?
You need several include files e.g. <string.h>