Sign in to follow this  

warning LNK4006

This topic is 3293 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey. I'm getting 291 warnings from TinyXML++ code. All the warnings look similiar to this:
Quote:
warning LNK4006: "protected: static void __cdecl TiXmlBase::ConvertUTF32ToUTF8(unsigned long,char *,int *)" (?ConvertUTF32ToUTF8@TiXmlBase@@KAXKPADPAH@Z) already defined in ticppd.lib(tinyxmlparser.obj); second definition ignored Game_Engine.lib
Except the last warning which is:
Quote:
Warning 291 warning LNK4221: no public symbols found; archive member will be inaccessible Game_Engine.lib
I've got a static library that uses TinyXML++ code. I then have another library that uses the first static library and this also uses TinyXML++ code. I then have a testing project that uses both libraries to test them as I add stuff. This also uses TinyXML++ code. I get the warnings when I compile the middle (second) library; it complains about the first library, Game_Engine.lib. I hope I've given enough info... but yeah, what have I done wrong here? Cheers. Edit: Before anyone mentions it, I've already read the other thread similiar to this one but I'm pretty sure they're all built as multi-threaded debug dlls: TinyXML++:
Quote:
/Od /D "TIXML_USE_TICPP" /D "UNICODE" /D "_UNICODE" /D "_CRT_SECURE_NO_DEPRECATE" /D "WIN32" /D "_WINDOWS" /D "DEBUG" /D "_DEBUG" /Gm /EHsc /RTC1 /MDd /Gy /Fo"obj/Debug\\" /Fd"obj/Debug\vc80.pdb" /W4 /nologo /c /Wp64 /ZI /TP /errorReport:prompt
Game_Engine:
Quote:
/Od /I "C:\tinyxml++" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug\Game_Engine.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt
Console_Game_Engine:
Quote:
/Od /I "C:\Documents and Settings\Bill\My Documents\Visual Studio 2005\Projects\Game_Engine\Game_Engine" /I "C:\tinyxml++" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug\Console_Game_Engine.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

Share this post


Link to post
Share on other sites
Quote:
Original post by Mybowlcut
I've got a static library that uses TinyXML++ code. I then have another library that uses the first static library and this also uses TinyXML++ code. I then have a testing project that uses both libraries to test them as I add stuff. This also uses TinyXML++ code. I get the warnings when I compile the middle (second) library; it complains about the first library, Game_Engine.lib.


Make so only the first mentioned library links to TinyXml. Then make the other projects just link to that, and include the TinyXml headers.

Didnt read the entire post but it seems that the problem is that the TinyXml functions are declared more than once. Doing the above should clear that up.

Share this post


Link to post
Share on other sites
Quote:
Original post by MizipzorMake so only the first mentioned library links to TinyXml. Then make the other projects just link to that, and include the TinyXml headers.

Didnt read the entire post but it seems that the problem is that the TinyXml functions are declared more than once. Doing the above should clear that up.
Legeeeend! :) Thanks.

Share this post


Link to post
Share on other sites

This topic is 3293 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this