vc6

What are some convincing arguments to upgrade from Visual Studio 6?

流过昼夜 提交于 2019-11-29 01:50:13
I have a client who is still using Visual Studio 6 for building production systems. They write multi-threaded systems that use STL and run on mutli-processor machines. Occasionally when they change the spec of or increase the load on one of their server machines they get 'weird' difficult to reproduce errors... I know that there are several issues with Visual Studio 6 development and I'd like to convince them to move to Visual Stuio 2005 or 2008 (they have Visual Studio 2005 and use it for some projects). The purpose of this question is to put together a list of known issues or reasons to

VS2012 C++ warning C4005: '__useHeader': macro redefinition

青春壹個敷衍的年華 提交于 2019-11-29 01:04:21
While migrating an old C++ project from Visual Studio 6 up to Visual Studio 2012, we came across an odd set of warnings from inside the standard Microsoft platform headers: warning C4005: '__useHeader' : macro redefinition warning C4005: '__on_failure' : macro redefinition An online search only found a few other people running into this error. In some cases, it was people trying to use VS2012 to compile legacy DirectX code - which I am not doing. In other cases, it was people trying to use VS2012 to target Windows XP (using the new option from Update 1) - which I am doing. The DirectX question

Using static variable along with templates

只愿长相守 提交于 2019-11-28 18:48:53
I have a template class defined in a header file like this. Here I have defined a static variable as well: #ifndef TEST1_H_ #define TEST1_H_ void f1(); static int count; template <class T> class MyClass { public: void f() { ++count; } }; #endif And I have defined main() function in a different cpp file like this: int main(int argc, char* argv[]) { MyClass<int> a; a.f(); f1(); cout<<"Main:" << count << "\n"; return 0; } I have implemented function f1() in a different cpp file like this: void f1() { MyClass<int> a; a.f(); cout<<"F1: " <<count <<"\n"; } When I compiled this using VC6, I got the

Upgraded MFC application still looks old

给你一囗甜甜゛ 提交于 2019-11-28 11:37:17
I have an MFC application written with VC6. I have upgraded it to VS2015 and it builds and runs. The application is a main exe with many DLL's that have dialogs in them. However the application still looks like it is built with VC6. None of the GUI components have the Windows 7 look and feel, they all still look old style. How can I make my existing application look more modern? You should at least add this line to your project, for example add to stdafx.h #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture

What's the latest version of Boost compatible with VC++6?

ぃ、小莉子 提交于 2019-11-28 08:27:03
What is the latest version of the Boost library that is compatible with Microsoft Visual C++ 6? And can you provide a link to download it directly? The Downloads link at http://www.boost.org only gives a download for version 1.36.0, and the documentation for that version lists Visual C++ 7.1 as the lowest version of Microsoft compiler tested. Do they purge out downloads for older versions? Boost 1.34.1 has been tested with vc6. The old versions are still available. You can get all older versions from the boost download page on SourceForge . The compilers used for regression tests are probably

Is it possible to use the VC++ 6 compiler in Visual Studio 2012?

本秂侑毒 提交于 2019-11-28 06:34:18
I am using Visual Studio 2012 to develop my projects, and I also have installed Visual Studio 2010 - which gives me the option to use the VC++10 compiler in Visual Studio 2012 (project properties), but I also have installed Visual C++ 6 and somehow the option to use the VC++6 compiler is not present in Visual Studio 2012, how do I add this option (manually)? chue x The answer is definitely maybe. It seems quite possible, but I could not get a copy of VC 6 so I was unable to verify it. What I was able to do was to get VS 2012 to use VC 7 (VS 2002) to compile a project. Update: The answer is

Problem with Macros

岁酱吖の 提交于 2019-11-28 00:17:29
HI , Can some one help me in understanding why the value of SQUARE(x) is 49 ? I am using Visual C++ 6.0 . #define SQUARE(X) X * X int main(int argc, char* argv[]) { int y = 5; printf("%d\n",SQUARE(++y)); return 0; } Neil Butterworth, Mark and Pavel are right. SQUARE(++y) expands to ++y * ++y, which increments twice the value of y. Another problem you could encounter: SQUARE(a + b) expands to a + b * a + b which is not (a+b)*(a+b) but a + (b * a) + b. You should take care of adding parentheses around elements when needed while defining macros: #define SQUARE(X) ((X) * (X)) is a bit less risky.

How can adding code to a loop make it faster?

允我心安 提交于 2019-11-27 14:58:46
I have a simple function with an inner loop - it scales the input value, looks up an output value in a lookup table, and copies it to the destination. (ftol_ambient is a trick I copied from the web for fast conversion of float to int). for (i = 0; i < iCount; ++i) { iScaled = ftol_ambient(*pSource * PRECISION3); if (iScaled <= 0) *pDestination = 0; else if (iScaled >= PRECISION3) *pDestination = 255; else { iSRGB = FloatToSRGBTable3[iScaled]; *pDestination = iSRGB; } pSource++; pDestination++; } Now my lookup table is finite, and floats are infinite, so there's a possibility of off-by-one

Link to all Visual Studio $ variables

断了今生、忘了曾经 提交于 2019-11-27 02:44:08
I was having a look at $(Configuration) , $(ProjectDir) etc. in Visual Studio 2008 for Prebuild events. Is there a link to all of these variables with a definition for each one of them? Try this MSDN page: Macros for Build Commands and Properties While there does not appear to be one complete list, the following may also be helpful: How to use Environment properties: http://msdn.microsoft.com/en-us/library/ms171459.aspx MSBuild reserved properties: http://msdn.microsoft.com/en-us/library/ms164309.aspx Well-known item properties (not sure how these are used): http://msdn.microsoft.com/en-us

Precompiled Headers

一世执手 提交于 2019-11-27 00:32:41
I have a sample project (not mine) which is in Visual C++ 6. I'm trying to convert it to Visual Studio 2008. The older project is using precompiled headers. Now the questions are: What are precompiled headers? Since the older project is using precompiled headers. I'll also use them in Visual Studio 2008 (the new project). But I get errors saying that "Did you forget to include stdafx.h" , to remedy the problem, I include "stdafx.h" in every source file. That worked perfectly. But the older project was not including "stdafx.h" in every file? Then how can I opt-out to include "stdafx.h" in each