Connie Zhang wrote:
I recently upgrade boost version of a visual C++ program from an old version of 1_58_0 to 1_64_0. Compared to the original executable, the newly upgraded one runs very slow (more than 6 times longer) even I disable the debug mode and set the optimization to /ox in visual environment.
The other difference between the old and the upgrade ones is the visual studio version. The old one is on 2010 and the new one 2013.
This problem sounds like one I had last year when upgrading a vendor library and from Visual Studio 2010 to 2012. I had persistent linker errors like this: error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' I was surprised (and actually angry) when I learned the cause: The Visual C++ 2012 compiler silently changes option /MT to /MTd if the preprocessor macro DEBUG or _DEBUG is set using /D. Some vendor libraries I needed were compiled only with /MT, so the link would always fail. It made no sense to me that a preprocessor macro definition should force a compiler option change like that. You did say that you disabled debugging, but… Are you defining either DEBUG or _DEBUG in the compiler command line? Try removing it if you do. If you use “#ifdef DEBUG” in your code, consider adding your own text to the macro name, such as “MY_PROJECT_DEBUG”. You can still debug your code without using /MTd by adding option /Zi or something similar to the compiler and linker commands. I hope this helps. |+| M a r k |+| Mark Stallard Engineering & Operations Application Development Business Application Services Global Business Services Information Technology stallard@raytheon.commailto:stallard@raytheon.com Raytheon Company 880 Technology Park Drive Billerica, MA 01821 www.raytheon.comhttp://www.raytheon.com/ This message contains information that may be confidential and privileged. Unless you are the addressee (or authorized to receive mail for the addressee), you should not use, copy or disclose to anyone this message or any information contained in this message. If you have received this message in error, please so advise the sender by reply e-mail and delete this message. Thank you for your cooperation.