Hi everyone,
I have a solution originally built in VS2003 several years ago. I need to use it now, but using VS2008. I've done the "convert projects" process, but I can't build the whole thing anymore. Here are the link errors I'm getting

It seems to be searching for some libs from VS2003 (mfc71.lib). I don't know what to do to fix it. Can you help me?

thanks in advance

May 17th, 2011, 01:38 PM

S_M_A

Re: Convert solution from VS2003 to VS2008

Seems like your original project was setup in a strange way. Either you create a new project, copy your source to that folder and add them to the new project (probably the easiest way) or you create a backup and then edit the vcproj-file(s) and remove all references to VS2003 files.

Also check that you haven't any other leftovers in the environment like INCLUDE, LIB and so on.

May 17th, 2011, 04:10 PM

leoalvesmachado

Re: Convert solution from VS2003 to VS2008

Hi S_M_A
Thanks for your answer.
I've tried to create a new project, but I still get these errors:

I believe I've got less errors because I've just simplified the code a little.

The project uses a set of libs from projects also built in VS2003 - I've imported all of them (they are in the same solution) and it compiled without problems in 2008 (I only got several warnings due to 'unsafe' code). Should I re-create all of the projects (it will take some time, but if it works, that's fine)? Maybe, is there anything in the project properties I'm missing?

May 17th, 2011, 04:23 PM

S_M_A

Re: Convert solution from VS2003 to VS2008

Yes, recreate all libs as well. You shouldn't mix things linked with different versions of the runtime.

For the moment you could do as the warnings say and define (probably) _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS (add them in project properties - C/C++ - Preprocessor - Preprocessor Definitions) to get rid of the unsafe code warnings in case they obscure more important warnings.

Edit: Oh! You still have that reference to mfc71.lib. It seems that you have some additional cleaning to do. Could it be that there's a #pragma comment( lib, "mfc71.lib" ) somewhere in the code?