All replies

Strange problem, looks like you have a version mismatch between the pass1 and the pass2 compiler modules (vc\bin\c1.dll and c2.dll). The dates don't look right; April 11th, 2005 looks about right for the original version. Feb 1st 2006 is too new for SP1, it should be around Dec 6th, 2006. Both files should definitely have the same date.

Guessing: you installed the wrong service pack, possibly the Vista version instead of the Express version.

thanks for your answer. Installing Visual C++ 2005 Express SP1 made the above described problem go away: Only to give me a new one. My company has developed a well used and tested C++ code that runs OK in Visual C++ 2005 Express (with and without the SP1-upgrade of Visual Studio 2005 Express installed) on our Windows 2000 machines. We have also some developer Windows XP-machines, and we have not been able to make the code run on any of these. On some of our XP-machines the Visual C++ Express simply refuses to start load the project file and chrashes with "Visual Studio encountered a problem and needs to close". On some XP, it helps to upgrade to the C++ 2005 Express SP1. Then the project-file loads and the code compiles. On execution it chrashes badly however with a "buffer overrun". I have reduced the problem to the following: I insert the following three lines of code at the start of main-loop:

Then the code chrashes with "buffer overrun" on the push_back line above. Mysterious. I guess we will have to replace our developer Win-XP machines with Win-2000 because of this problem. Unless Vista works better with Visual C++, but I wouldnt bet on it.

Ive tried uninstalling and reinstalling. Several times. As I write this, I just finished another uninstall/reinstall. Now I have the P1 != P2 problem at the linking stage as reported before. I know how to get rid of that: Install the C++ 2005 Express SP1 upgrade pack. But then Im back to the code chrashing as explained above. I checked some of the system header files, they have been modified in SP1 (xutility.h and several more headers). And since Im able to reproduce this whole scenario on several different PCs running Windows XP, Im inclined to think that the problem has something to do with the interplay between Win XP and Visual C++ 2005 Express. Because on Win 2000 it works for me and Ive not been able to reproduce this problem on Win 2000 at all. So maybe the easiest "solution" is to wipe out Win XP on my new laptop and replace it with Win 2000. But of course I know everything code and OS-technical problem like this has a natural explanation. But to pin it down in Windows is a time-consuming nightmare for non-experts like me. Im just a scientist ;-)

could you solve your problems now? I ask because we have currently the same problems in our lab. I use Win XP SP2 with VS2005 Professional. On one machine with VS2005 SP1 we have exceptions with vector<string>, too (in Release Code). On another machine without SP1 we have exactly the same Linker error (P1 != P2). Currently I install SP1 to see if the linker error disappears, but the vector<string> problems are very, very strange and we debug since 2 days to find out that reason. Do you use 4 or 8 byte alignment in compile settings? Do you link with some C++ libs that have classes with vector<string> members? I assume that this is a linker problem, too, but we currently can not prove it with a small example.

If you have a small vector<string> sample that does not work, I could try it on our machines. Maybe we can track down that problem together.

the vector<string> problem is solved. In one library project there was the preprocessor macro _SECURE_SCL=0 defined. This causes the STL to push more or less parameters to the stack. These parameters of course are not consistent with the parameters used by the other libraries and this leads to very courious effects.

The problem is simple to be solved. The VS solution file where in your source code is, would have been using a library compiled by some other version of VS.

Get the source code from which particular library is generated, compile it to produce the new lib file using the version of VS that is currently running in your machine. Use that *.lib file to be linked to your final solution.