Category "visual-c++"

MSVC 2019 and 2022 compiler hangs and is erratic compiling relatively large std::complex arrays in c++17 and c++20

Using the latest C++ MSVC 2019 and 2022 the following code hangs while compiling #include <complex> // const int N = 10000; // about 3 secs // const int N

Printing a message from a base class function through the operator <<

This is the header file with class Rectangle that inherits from class Shape: class Rectangle: public Shape { private: double width; double height;

Visual Studio, Copy files to project directory problem

I have Visual Studio community 2017. coming from eclipse it was just enough to copy file to project directory and hit refresh then files were appearing in proje

On Windows MSVC, is it possible to merge some .obj into one .obj? If yes, how should I do that?

For example, there is three object files a.obj b.obj c.obj just compiled out with cl, and it is desired to combine them into one combined.obj. A comment of an S

for loop not running in C plus plus program, without showing any error - CLOSED

It is a very simple program and I have just started learning c++ but the for loop is not working in this program. can anyone tell me why the for loop in this c+

Strange unicode error when converting Chinese wide strings to regular strings in C++

Some of my Chinese software users noticed a strange C++ exception being thrown when my C++ code for Windows tried to list all running processes: 在ࣩ

Only clang-cl is supported on Windows when building project with webrtc

I am trying to build a project that contains webrtc. However compilation fails with this error : vendor\webrtc\src\base/compiler_specific.h(11,1): fatal error C

Lnk1104 cannot open file debug.obj

I have a C++ project in vs 2022 that giving me a lnk1104 error. I have made sure that "debug information format " is set to Z1, but the debug.obj or the .pdb fi

How to shrink the size of a WTL application?

WTL applications are quite small already. However, using VS 2005 a statically linked application with WTL 9.10 weighs in at 136 kB (139,264 Bytes) for the Win32

Operator Overloading Test Failure

Build is successful, but the test case #2 keep failing. I don't know what to change or fix. The test program says that Test Case #2 operator <=() FAILED and

print the unordered map values when key value is given as input

I have written the code to read the string values and mapped as key and value. Now I am facing issue in printing the values, if we have given key value as input

How is CONDITION_VARIABLE implemented?

A longer version of the title question would be: On my machine, sizeof(std::condition_variable) is 72 bytes. What are these 72 bytes used for? Note: The size

Value greater than 10^5 in 2d array was not declared in scope

When I tried:int global[10000][10000]; it works but whenint global[100000][100000]; when I try to access it it gives me error: global was not declared in the s

Legacy VC++, Com based Desktop application to Modern web with microservices

I am in the process of moving my existing desktop application to web. The GUI is developed using MFC/VC++ and the buisness logic is written in COM enabled VC++

What is the difference between the LIB and LIBPATH environment variables for MS Visual C/C++?

I've been working on some build scripts, and this is bugging me. I want to be sure that we're independent of environment settings, but in order to be sure of th

error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj

I was converting my projects from VS2010 to VS2012.But I am getting an _MSC_VER linker error in certain projects. After a long surfing through google I found ou

GetFileAttributes with environment variables

I am trying to have a file exist or not in a path using vc++. if (INVALID_FILE_ATTRIBUTES != GetFileAttributes(L"%windir%\Myfile.exe")) printf("\n %ws"

How to link against msvcrt.dll instead of msvcr100.dll in VC++ 10.0?

Is it possible to link against VC6's MSVCRT.DLL in VC++10.0? By default it seems to be linking with MSVCR100.DLL, but I don't want to redistribute yet another

How to generate an import library (LIB-file) from a DLL?

Is it possible to autogenerate a MSVC import library (LIB-file) from a DLL? How?

Visual C++ 2022, Microsoft Store and MSIX manifest question

Hi! Would someone answer my question, please? I have a Visual C++ application linked against C++ DLL Runtime. It is converted to Microsoft Store app by MSIX Pac