By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

How to get rid of multiple definition of _S_node_allocator_lock

P: 1
Hello,

I recently ported my code to Tornado 2.2 VxWorks5.5 I finaly got all the
projects to build and compile,but in the last stage of the build when I link the application software with the ppc BSP, I get
an multiple definition to items associated with the Standard Template
Libraries. this did not occur with 2.0. The errors are listed below, any
help Please

the multi-definition is:
__default_alloc_template<true, 0>::_S_node_allocator_lock
when I remove all "string" declaration and quotos, the multi-definition disappears.
I guess the threads used by BSP and application software are different,
as MSDN "LNK2005 error" has points out,
but I could not know how to solve this problem, help me!
Aug 12 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 114
Hello,

I recently ported my code to Tornado 2.2 VxWorks5.5 I finaly got all the
projects to build and compile,but in the last stage of the build when I link the application software with the ppc BSP, I get
an multiple definition to items associated with the Standard Template
Libraries. this did not occur with 2.0. The errors are listed below, any
help Please

the multi-definition is:
__default_alloc_template<true, 0>::_S_node_allocator_lock
when I remove all "string" declaration and quotos, the multi-definition disappears.
I guess the threads used by BSP and application software are different,
as MSDN "LNK2005 error" has points out,
but I could not know how to solve this problem, help me!
Is all this in a header file?
If it is, you can do something like this:
Expand|Select|Wrap|Line Numbers
  1. #ifndef _HEADER_FILE_DEF_
  2. #define _HEADER_FILE_DEF_
  3.  
  4. #include <whatever>
  5.  
  6. //Prototypes and defines go here
  7.  
  8. #endif
  9.  
  10.  
And finally, in the source file, you include your header file.

did that help?
Aug 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.