Jump to content
  • Advertisement
Sign in to follow this  
Novative

Visual Studio 2003 Linker Error

This topic is 5026 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

Hi folks out there ! Unfortunately the search feature of this board let me down (may be my connection), so I apologize in advance for any duplicate matter I am posting. I just encountered a strange error in VS 2003 while trying to compile&link a rather large project and wondered if anyone has seen something similar. Having a relatively simple class-hierarchy (involving virtual inheritance) with some pure virtual and virtual methods in the base-class, VS7 seems to have a problem linking the whole thing when the return-types of the derived methods in the first ancenstor-classes are not *exactly* the same (the compiler is happy with it, coz all return types are covariant to the base-classes one). The linker quits with a LNK2005 and complains about having multiple definitions of the respected methods in the obj-file of the derived class. When I adjust the return types everythings linking fine. Other compilers (namely Codewarrior and gcc) link without problems. Unfortunately I was not yet able to reconstruct the situation on a smaller scale, involving just a few files so I could give you some example-code. If anybody has seen anything comparable, I'd appreciate any help! Thnx in advance, Hope I have made my point clear enough to follow, Christian P.S: /FORCE for the linker helps out, but is not the solution I am looking for. Should mention, that I am not running MFC or Managed C++, neither have I included any other library-files apart from VS7 win32-console libs [Edited by - Novative on October 17, 2004 5:15:41 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!