Jump to content
  • Advertisement
Sign in to follow this  
AndDroid

At wits end with unresolved symbol linker error

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

I've recently upgraded to Visual Sutdio 2005, and code that had compiled and run fine in Visual Studio 2003 no longer works. I am using SDL and FMOD libraries in my code. When compiling in debug mode, I get linker errors in several of my files: error LNK2001: unresolved external symbol __imp___CrtDbgReportW The only correlation I can find between the files that have this error is that they all use STL iterators. When I switch my configuration to release, the code builds, links, and executes fine, but the locals viewer doesn't work, as I imagine the appropriate debugging information isn't generated in release mode. I would greatly appreciate ANY suggestions anyone has, as my code is becoming hard to debug while working in release mode. Thanks for any information

Share this post


Link to post
Share on other sites
Advertisement
If it works when you switch to release, have you looked at the libraries you link to in the release build? See if they are different or if there are more libraries.

Sounds like you've worked on this though and that seems like too simple a solution.. that should be the main difference (linking-wise) between the build types.

Share this post


Link to post
Share on other sites
The libraries linked are the same in both builds. In fact, the only differences on the command line for the linker between the two configurations, aside from path differences, is that the release config includes: /OPT:REF /OPT:ICF
I tried to include this in the debug command line but had the same problem.

Any other ideas from anyone?
Thanks

Share this post


Link to post
Share on other sites
The symbol _imp___CrtDbgReportW is an MS debug reporting routine, which is probably the only reason why it isn't missed in release mode.

The W-suffix indicates the wide-character version of the symbol. Check if in all your projects the character set is set to the same thing (either unicode/wide or multi-byte/ascii).

Try linking with LIBCMTD.lib which should define the symbol. You can specifiy this as an extra input under the linker tab. You might have to exclude MSVCRTD.lib from the project in this case.

You might also want to check the code generation tab under the C++ item in the properties tree. Try switching from "Debug Multi-Thread DLL" to "Debug Multi-Thread".

If you continue working from your VS6.0 project, make sure the property sheet is inherited (I don't know the exact name but it should say something like 'vs60props.sheet' in combination with 'inherited' in your project settings somewhere).

Make sure you clean and rebuild all in between.

Good luck. Illco

Share this post


Link to post
Share on other sites
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!