31,776 questions
Score of 0
0 answers
128 views
MFC library for V145 missing from visual studio 2026
I have a project originally built under Visual Studio 2022 without issue, and am trying to build it now under VS 2026. This generates a DLL. It has no user interface and is written entirely in C++. ...
Score of 1
0 answers
143 views
How to install a fixed MSVC Preview version in a windows docker container?
How am I supposed to build a stable docker image, containing a fixed version of the MSVC Buildtools, to later build my code with in the CI-Pipeline?
My requirements are relatively simple: I would like ...
Score of 1
2 answers
167 views
Visual Studio Debugging: freeze current thread by code
VSC++ contains the function __debugbreak() that causes the debugger to step in and break the debugee at execution.
When debugging multiple threads, threads can be frozen/thawed manually to prevent ...
Score of 0
0 answers
90 views
Defining implementation in global code of module extern declared function in Clang 20 gives 'declaration follows declaration' unlike MSVC [duplicate]
My error:
[3/4] Building CXX object CMakeFiles/my.dir/main.cpp.o
FAILED: CMakeFiles/my.dir/main.cpp.o
/usr/bin/clang++-20 -std=gnu++23 -MD -MT CMakeFiles/my.dir/main.cpp.o -MF CMakeFiles/my.dir/main....
Score of 0
1 answer
76 views
How to add PageBreak at the end of Tablix2 displayed via SubReport?
I am using VS2015, WinForms, VC++.RDLC reports. My Report Body have 2- Tablix like the below
Tablix1 - Group By - Table1-Field [myreport_copy] - Page Break at Each Instance of Group
Tablix1 - Below ...
Score of 9
2 answers
684 views
Why can't I pass a reference to a static member function in MSVC?
Why does this code produce the following error?
struct F
{
static int f();
};
template <auto &F>
int r()
{
return 0;
}
int main() {
r<F::f>();
}
<source>(13): ...
Score of 0
1 answer
115 views
Why do my property sheet outlook bar icons have a magenta tinge?
I am using MFC.
The property sheet is displaying the 32 x 32 images. And the dialogs static controls are showing the 64 by 64 versions.
The property sheet is of type CMFCPropertySheet
And the other ...
Score of 10
1 answer
450 views
MSVC don't consider conversion operator when initializing aggregate with parenthesis
I stumbled upon this code:
struct type1 { int a; };
struct type2 { int a; type1 agg; int b; };
struct deducer {
operator type1() {
return type1{};
}
};
auto main() -> int {
...
Score of 0
0 answers
90 views
How do I display labels on multiple line cell elements simultaneously in VTK?
I'm new to VTK. I use the VC++ compiler and have always drawn objects using Windows GDI/GDI+ and OpenGL. I'm currently switching to VTK for practical reasons, and I'm very happy with it because it ...
Score of 4
2 answers
165 views
Cannot specify `__forceinline` for an implementation of a member function in a separate translation unit
Consider the following three files "main.cpp"
#include ".hpp"
__declspec(noinline)
int main(int, char**)
{
x().DoFoo();
x::dobar();
::dobaz();
return 0;
}
"....
Score of 0
0 answers
103 views
Is there a way to include debug information into PDB-file selectively?
I build my C++ program in Visual Studio 2022 (cmake-project) using a large static-built library (QT).
The library was built in Debugx64 mode. I want to build program including debug information for it,...
Score of 6
0 answers
262 views
Why is module std available even though it isn't re-exported?
Consider this simple code with two files:
module.ixx
export module m;
import std;
export namespace m {
struct Object {
std::string_view data() {
return "DATA";
}
};
}
...
Score of 1
1 answer
187 views
Why does this valid C++20 code compile on Clang but fail on MSVC with a template deduction error? [closed]
I’m experimenting with C++20 concepts and encountered a compiler discrepancy.
This code compiles on Clang 17 and GCC 13, but MSVC (VS2022) rejects it:
template <typename T>
concept HasFoo = ...
Score of 6
0 answers
192 views
Type aliases for functions with auto deduced return type in Visual C++
I found accidently that MSVC compiler from Visual Studio allows one to declare an alias for a function type with auto deduced return type, see T in the example program as follows:
auto l = +[]{ return ...
Score of 0
2 answers
99 views
Providing stubs to a static library
Environment:
Windows, Visual Studio, low level.
A bit of context:
One of my project is a static library with C functions that export functionalities. Some of those C functions make use of C functions ...