Undefined symbol in C++ template member function when put on vxWorks

Y

yamitmehta

When I compile to code using g++arm of VxWorks 5.5 and put it on my
board i get the follwing undefined symbols:-
Cpool and Csingleton are template classes. CPool has the static member
variables:-ms_uCapacity ,ms_uAllocatedCount ,
ms_uLockCapacity ,ms_pmutex

-> ld < yamit/apps1.out
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uCapacity
(binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uAllocatedCount
(binding 1 type 0)
Undefined symbol: resolvQuery (binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_pBlockAllocator
(binding 1 type 0)
Undefined symbol:
_Q23m5tt10CSingleton1ZQ23m5t12CTimeUpdater$ms_pInstance (binding 1 type
0)
Undefined symbol: _Q23m5tt10CSingleton1ZQ23m5t7CCrypto$ms_pInstance
(binding 1 type 0)
Undefined symbol: resolvDNExpand (binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uLockCapacity
(binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_pmutex (binding
1 type 0)
Undefined symbol:
_Q23m5tt10CSingleton1ZQ23m5t17CDefaultAllocator$ms_pInstance (binding 1
type 0)
ld error: Module contains undefined symbol(s) and may be unusable.
value = 0 = 0x0

-> voipInit
YM1A call to M5T code/n
Data abort
Exception address: 0x0064c998
Current Processor Status Register: 0x80000013

trcStack aborted: error in frame
184430 yystart +74c: voipInit ()
63b55c voipInit +14 :
m5t::CFrameworkInitializer::Initialize(void) ()
63af50 m5t::CFrameworkInitializer::Initialize(void)+220:
m5t::InitializeCTime(void) ()
63d7a4 m5t::InitializeCTime(void)+c :
m5t::CTime::InitializeCTime(void) ()
63d698 m5t::CTime::InitializeCTime(void)+78 :
m5t::CTimeZone::CTimeZone(char const *) ()
63fb0c m5t::CTimeZone::CTimeZone(char const *)+1c0:
m5t::CTimeZone::SetTimeZone(char const *) ()
64054c m5t::CTimeZone::SetTimeZone(char const *)+1f0:
m5t::CString::eek:perator=(char const *) ()
64bea4 m5t::CString::eek:perator=(char const *)+b8 :
m5t::CString::ReserveCapacity(unsigned short) ()
shell restarted.


Could anyone suggest and solution?
 
J

Jack Klein

When I compile to code using g++arm of VxWorks 5.5 and put it on my
board i get the follwing undefined symbols:-
Cpool and Csingleton are template classes. CPool has the static member
variables:-ms_uCapacity ,ms_uAllocatedCount ,
ms_uLockCapacity ,ms_pmutex

-> ld < yamit/apps1.out
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uCapacity
(binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uAllocatedCount
(binding 1 type 0)
Undefined symbol: resolvQuery (binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_pBlockAllocator
(binding 1 type 0)
Undefined symbol:
_Q23m5tt10CSingleton1ZQ23m5t12CTimeUpdater$ms_pInstance (binding 1 type
0)
Undefined symbol: _Q23m5tt10CSingleton1ZQ23m5t7CCrypto$ms_pInstance
(binding 1 type 0)
Undefined symbol: resolvDNExpand (binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uLockCapacity
(binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_pmutex (binding
1 type 0)
Undefined symbol:
_Q23m5tt10CSingleton1ZQ23m5t17CDefaultAllocator$ms_pInstance (binding 1
type 0)
ld error: Module contains undefined symbol(s) and may be unusable.
value = 0 = 0x0

-> voipInit
YM1A call to M5T code/n
Data abort
Exception address: 0x0064c998
Current Processor Status Register: 0x80000013

trcStack aborted: error in frame
184430 yystart +74c: voipInit ()
63b55c voipInit +14 :
m5t::CFrameworkInitializer::Initialize(void) ()
63af50 m5t::CFrameworkInitializer::Initialize(void)+220:
m5t::InitializeCTime(void) ()
63d7a4 m5t::InitializeCTime(void)+c :
m5t::CTime::InitializeCTime(void) ()
63d698 m5t::CTime::InitializeCTime(void)+78 :
m5t::CTimeZone::CTimeZone(char const *) ()
63fb0c m5t::CTimeZone::CTimeZone(char const *)+1c0:
m5t::CTimeZone::SetTimeZone(char const *) ()
64054c m5t::CTimeZone::SetTimeZone(char const *)+1f0:
m5t::CString::eek:perator=(char const *) ()
64bea4 m5t::CString::eek:perator=(char const *)+b8 :
m5t::CString::ReserveCapacity(unsigned short) ()
shell restarted.


Could anyone suggest and solution?

No solution until after you follow the suggestion.

POST THE CODE.

There is something wrong with your source code, but my crystal ball is
off for the holiday weekend...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top