I only have 1998 and 2005 handy at the moment. MS seems to change where they hide such settings in each release. So I'm not sure where it is in the 2003 version.
First make sure you are doing a release build, not a debug build. It is very hard to get optimization working in a debug build and very hard to debug with optimizations enabled (for various reasons, I usually do debug fully optimized builds, but only because I have no choice. I don't recommend debugging optimized builds if you have a choice).
I expect a high level of optimization is the default in a release build, so once you select a release build you're probably OK.
But check the optimization level by going to the project properties (or settings or whatever it was called in the 2003 version) and selecting the C/C++ folder and the optimization sub folder and then make some good guesses what the choices there mean.
BTW, why ask for Visual Studio help in a Linux forum?
BTW2, functions, DLLs, and programs build with Mingw can be freely mixed with those built with Windows C/C++ compilers, including Visial C++. So if you do have code that Visual C++ won't compile decently (unlikely) then Mingw (unlike Cygwin) is a solution to your goal of being able to add the result to a larger program.
Quote:
Originally Posted by bhtawfik
I modified this code to run it under windows (Visual C++ 2003)
|
But with vague statements like that, there are always plenty of other possibilities for the cause of the problem. Maybe the optimization is OK or irrelevant and it was your modifications that made the code slower. You've told us so little that most of what we can tell you is just guesses.