Hi Tommi,

Am 18.08.2014 um 20:02 schrieb Tommi Mäkitalo:
> Hi Oliver,
>
> you try to compile a C++ program using a C compiler. gcc runs the C 
> compiler and g++ runs the C++ compiler.

ok, understood, my mistake.

>
> And there is another problem with the command line. Calling the compiler 
> without -c flag runs the linker also. The you should not specify a *.o 
> file as output.
>
> Either
>      g++ -c tntsocketserver.cpp
works
>      g++ -o tntsocketserver -lcxxtools -lcxxtools-http -lcxxtools-xmlrpc 
> tntsocketserver.o
doesnt work

>
> to just compile tntsocketserver.cpp to tntsocketserver.o and run the 
> linker separately. or:
>      g++ -o tntsocketserver -lcxxtools -lcxxtools-http -lcxxtools-xmlrpc 
> tntsocketserver.cpp
>
> to compile and link in one step.

Unfortunatly this doesnt work, too (same as step2 above):

oliver@hp:~$ g++ -o tntsocketserver -lcxxtools -lcxxtools-http
-lcxxtools-xmlrpc tntsocketserver.cpp/tmp/ccwUo9Jv.o: In Funktion `main':
tntsocketserver.cpp:(.text+0x227): Nicht definierter Verweis auf
`cxxtools::LoggerManager::logInit()'
tntsocketserver.cpp:(.text+0x236): Nicht definierter Verweis auf
`cxxtools::EventLoop::EventLoop()'
tntsocketserver.cpp:(.text+0x256): Nicht definierter Verweis auf
`cxxtools::http::Server::Server(cxxtools::EventLoopBase&, unsigned
short, int)'
tntsocketserver.cpp:(.text+0x457): Nicht definierter Verweis auf
`cxxtools::http::Server::addService(std::string const&,
cxxtools::http::Service&)'
tntsocketserver.cpp:(.text+0x493): Nicht definierter Verweis auf
`cxxtools::xmlrpc::Service::~Service()'
tntsocketserver.cpp:(.text+0x4a2): Nicht definierter Verweis auf
`cxxtools::http::Server::~Server()'
tntsocketserver.cpp:(.text+0x4b1): Nicht definierter Verweis auf
`cxxtools::EventLoop::~EventLoop()'
tntsocketserver.cpp:(.text+0x5bc): Nicht definierter Verweis auf
`cxxtools::xmlrpc::Service::~Service()'
tntsocketserver.cpp:(.text+0x5d3): Nicht definierter Verweis auf
`cxxtools::http::Server::~Server()'
tntsocketserver.cpp:(.text+0x5ea): Nicht definierter Verweis auf
`cxxtools::EventLoop::~EventLoop()'
/tmp/ccwUo9Jv.o: In Funktion `cxxtools::http::Service::Service()':
tntsocketserver.cpp:(.text._ZN8cxxtools4http7ServiceC2Ev[_ZN8cxxtools4http7ServiceC5Ev]+0x5f):
Nicht definierter Verweis auf `cxxtools::Mutex::Mutex()'
tntsocketserver.cpp:(.text._ZN8cxxtools4http7ServiceC2Ev[_ZN8cxxtools4http7ServiceC5Ev]+0x6f):
Nicht definierter Verweis auf `cxxtools::Condition::Condition()'
tntsocketserver.cpp:(.text._ZN8cxxtools4http7ServiceC2Ev[_ZN8cxxtools4http7ServiceC5Ev]+0x84):
Nicht definierter Verweis auf `cxxtools::Mutex::~Mutex()'
/tmp/ccwUo9Jv.o: In Funktion `cxxtools::http::Service::~Service()':
tntsocketserver.cpp:(.text._ZN8cxxtools4http7ServiceD2Ev[_ZN8cxxtools4http7ServiceD5Ev]+0x24):
Nicht definierter Verweis auf `cxxtools::Condition::~Condition()'
tntsocketserver.cpp:(.text._ZN8cxxtools4http7ServiceD2Ev[_ZN8cxxtools4http7ServiceD5Ev]+0x34):
Nicht definierter Verweis auf `cxxtools::Mutex::~Mutex()'
tntsocketserver.cpp:(.text._ZN8cxxtools4http7ServiceD2Ev[_ZN8cxxtools4http7ServiceD5Ev]+0x8e):
Nicht definierter Verweis auf `cxxtools::Mutex::~Mutex()'
/tmp/ccwUo9Jv.o: In Funktion `cxxtools::InitLocale::InitLocale()':
tntsocketserver.cpp:(.text._ZN8cxxtools10InitLocaleC2Ev[_ZN8cxxtools10InitLocaleC5Ev]+0x25):
Nicht definierter Verweis auf
`std::ctype<cxxtools::Char>::ctype(unsigned long)'
tntsocketserver.cpp:(.text._ZN8cxxtools10InitLocaleC2Ev[_ZN8cxxtools10InitLocaleC5Ev]+0x98):
Nicht definierter Verweis auf
`std::numpunct<cxxtools::Char>::numpunct(unsigned long)'
/tmp/ccwUo9Jv.o: In Funktion
`cxxtools::SerializationInfo::~SerializationInfo()':
tntsocketserver.cpp:(.text._ZN8cxxtools17SerializationInfoD2Ev[_ZN8cxxtools17SerializationInfoD5Ev]+0x15):
Nicht definierter Verweis auf `cxxtools::SerializationInfo::_releaseValue()'
/tmp/ccwUo9Jv.o: In Funktion
`cxxtools::SerializationInfo::setValue(double)':
tntsocketserver.cpp:(.text._ZN8cxxtools17SerializationInfo8setValueEd[_ZN8cxxtools17SerializationInfo8setValueEd]+0x1f):
Nicht definierter Verweis auf
`cxxtools::SerializationInfo::_setFloat(long double)'
/tmp/ccwUo9Jv.o: In Funktion
`cxxtools::SerializationInfo::getValue(double&) const':
tntsocketserver.cpp:(.text._ZNK8cxxtools17SerializationInfo8getValueERd[_ZNK8cxxtools17SerializationInfo8getValueERd]+0x2d):
Nicht definierter Verweis auf
`cxxtools::SerializationInfo::_getFloat(char const*, long double) const'
/tmp/ccwUo9Jv.o: In Funktion `cxxtools::xmlrpc::Service::Service()':
tntsocketserver.cpp:(.text._ZN8cxxtools6xmlrpc7ServiceC2Ev[_ZN8cxxtools6xmlrpc7ServiceC5Ev]+0x30):
Nicht definierter Verweis auf `vtable for cxxtools::xmlrpc::Service'
/tmp/ccwUo9Jv.o: In Funktion
`std::locale::locale<std::ctype<cxxtools::Char> >(std::locale const&,
std::ctype<cxxtools::Char>*)':
tntsocketserver.cpp:(.text._ZNSt6localeC2ISt5ctypeIN8cxxtools4CharEEEERKS_PT_[_ZNSt6localeC5ISt5ctypeIN8cxxtools4CharEEEERKS_PT_]+0x4e):
Nicht definierter Verweis auf `std::ctype<cxxtools::Char>::id'
/tmp/ccwUo9Jv.o: In Funktion
`std::locale::locale<std::numpunct<cxxtools::Char> >(std::locale const&,
std::numpunct<cxxtools::Char>*)':
tntsocketserver.cpp:(.text._ZNSt6localeC2ISt8numpunctIN8cxxtools4CharEEEERKS_PT_[_ZNSt6localeC5ISt8numpunctIN8cxxtools4CharEEEERKS_PT_]+0x4e):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::id'
/tmp/ccwUo9Jv.o: In Funktion `void
cxxtools::ServiceRegistry::registerFunction<double, double,
double>(std::string const&, double (*)(double, double))':
tntsocketserver.cpp:(.text._ZN8cxxtools15ServiceRegistry16registerFunctionIdddEEvRKSsPFT_T0_T1_E[_ZN8cxxtools15ServiceRegistry16registerFunctionIdddEEvRKSsPFT_T0_T1_E]+0x69):
Nicht definierter Verweis auf
`cxxtools::ServiceRegistry::registerProcedure(std::string const&,
cxxtools::ServiceProcedure*)'
/tmp/ccwUo9Jv.o: In Funktion `cxxtools::Decomposer<double>::Decomposer()':
tntsocketserver.cpp:(.text._ZN8cxxtools10DecomposerIdEC2Ev[_ZN8cxxtools10DecomposerIdEC5Ev]+0x30):
Nicht definierter Verweis auf
`cxxtools::SerializationInfo::SerializationInfo()'
/tmp/ccwUo9Jv.o: In Funktion
`cxxtools::Decomposer<double>::format(cxxtools::Formatter&)':
tntsocketserver.cpp:(.text._ZN8cxxtools10DecomposerIdE6formatERNS_9FormatterE[_ZN8cxxtools10DecomposerIdE6formatERNS_9FormatterE]+0x23):
Nicht definierter Verweis auf
`cxxtools::IDecomposer::formatEach(cxxtools::SerializationInfo const&,
cxxtools::Formatter&)'
/tmp/ccwUo9Jv.o: In Funktion `cxxtools::Decomposer<double>::begin(double
const&)':
tntsocketserver.cpp:(.text._ZN8cxxtools10DecomposerIdE5beginERKd[_ZN8cxxtools10DecomposerIdE5beginERKd]+0x1c):
Nicht definierter Verweis auf `cxxtools::SerializationInfo::clear()'
/tmp/ccwUo9Jv.o: In Funktion
`std::__use_cache<std::__numpunct_cache<cxxtools::Char>
>::operator()(std::locale const&) const':
tntsocketserver.cpp:(.text._ZNKSt11__use_cacheISt16__numpunct_cacheIN8cxxtools4CharEEEclERKSt6locale[_ZNKSt11__use_cacheISt16__numpunct_cacheIN8cxxtools4CharEEEclERKSt6locale]+0x14):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::id'
/tmp/ccwUo9Jv.o: In Funktion
`std::__numpunct_cache<cxxtools::Char>::_M_cache(std::locale const&)':
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x78):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::grouping()
const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0xdf):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::grouping()
const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x181):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::truename()
const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x22d):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::truename()
const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x248):
Nicht definierter Verweis auf `std::basic_string<cxxtools::Char,
std::char_traits<cxxtools::Char>, std::allocator<cxxtools::Char>
>::copy(cxxtools::Char*, unsigned long, unsigned long) const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x27c):
Nicht definierter Verweis auf
`std::numpunct<cxxtools::Char>::falsename() const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x322):
Nicht definierter Verweis auf
`std::numpunct<cxxtools::Char>::falsename() const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x33d):
Nicht definierter Verweis auf `std::basic_string<cxxtools::Char,
std::char_traits<cxxtools::Char>, std::allocator<cxxtools::Char>
>::copy(cxxtools::Char*, unsigned long, unsigned long) const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x36a):
Nicht definierter Verweis auf
`std::numpunct<cxxtools::Char>::decimal_point() const'
tntsocketserver.cpp:(.text._ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale[_ZNSt16__numpunct_cacheIN8cxxtools4CharEE8_M_cacheERKSt6locale]+0x39c):
Nicht definierter Verweis auf
`std::numpunct<cxxtools::Char>::thousands_sep() const'
/tmp/ccwUo9Jv.o: In Funktion `std::ctype<cxxtools::Char> const&
std::use_facet<std::ctype<cxxtools::Char> >(std::locale const&)':
tntsocketserver.cpp:(.text._ZSt9use_facetISt5ctypeIN8cxxtools4CharEEERKT_RKSt6locale[_ZSt9use_facetISt5ctypeIN8cxxtools4CharEEERKT_RKSt6locale]+0xd):
Nicht definierter Verweis auf `std::ctype<cxxtools::Char>::id'
tntsocketserver.cpp:(.text._ZSt9use_facetISt5ctypeIN8cxxtools4CharEEERKT_RKSt6locale[_ZSt9use_facetISt5ctypeIN8cxxtools4CharEEERKT_RKSt6locale]+0x76):
Nicht definierter Verweis auf `typeinfo for std::ctype<cxxtools::Char>'
/tmp/ccwUo9Jv.o: In Funktion `std::numpunct<cxxtools::Char> const&
std::use_facet<std::numpunct<cxxtools::Char> >(std::locale const&)':
tntsocketserver.cpp:(.text._ZSt9use_facetISt8numpunctIN8cxxtools4CharEEERKT_RKSt6locale[_ZSt9use_facetISt8numpunctIN8cxxtools4CharEEERKT_RKSt6locale]+0xd):
Nicht definierter Verweis auf `std::numpunct<cxxtools::Char>::id'
tntsocketserver.cpp:(.text._ZSt9use_facetISt8numpunctIN8cxxtools4CharEEERKT_RKSt6locale[_ZSt9use_facetISt8numpunctIN8cxxtools4CharEEERKT_RKSt6locale]+0x76):
Nicht definierter Verweis auf `typeinfo for std::numpunct<cxxtools::Char>'
collect2: error: ld returned 1 exit status

Regards
Oliver



------------------------------------------------------------------------------
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to