LNK2005, using #include <vector> and <map>

F

Florian Liefers

"Hello World\n",

i have the following problem:
One of my headerfiles for a lib is including <vector>.
When i compile the lib, everything is done well.
In my application another file is including <map>.
By linking my application and the lib, following errors occur:

error LNK2005: "public: __thiscall std::basic_string<char,struct
std::char_traits said:
::~basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(void)"
(??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)
bereits in Engine.lib(WaterBox.obj) definiert
error LNK2005: "public: __thiscall std::basic_string<char,struct
std::char_traits said:
::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(char const *)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)
bereits in Engine.lib(WaterBox.obj) definiert
error LNK2005: "public: __thiscall std::basic_string<char,struct
std::char_traits said:
::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
bereits in Engine.lib(WaterBox.obj) definiert
error LNK2005: "public: char const * __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::c_str(void)const "
(?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ)
bereits in Engine.lib(WaterBox.obj) definiert

Can anyone help me?

Tnx,
Florian
 
T

tom_usenet

"Hello World\n",

i have the following problem:
One of my headerfiles for a lib is including <vector>.
When i compile the lib, everything is done well.
In my application another file is including <map>.
By linking my application and the lib, following errors occur:
[SNIP errors]

Can anyone help me?

If you ask in the correct group you will get good help (usually). This
group covers the standard C++ language (and library) only, not
specific compiler installation problems. The error messages look
microsofty, so try microsoft.public.vc.stl or
microsoft.public.vc.language or similar.

Tom
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top