visual-c++

Visual Studio Express: fatal error c1060, the compiler is out of heap space

做~自己de王妃 提交于 2020-05-09 02:19:30
问题 I'm trying to build a program from its source code with VC 11 and when the compiler is going to finish, it raises the error in title. As I've read here and in other forums, I've alteady tried both to close as many programs as possibile and to enlarge the size of the swap file in Windows...they don't work. I've read about a parameter called \Zm but I don't understand how to use it. Can you please help me? 回答1: Take a look at this documentation which gives possible solutions: I also had that

How do I configure MSVC to show relative path for header files using __FILE__?

点点圈 提交于 2020-05-01 16:11:12
问题 I recently discovered that when using the __FILE__ predefined macro in MSVC (specifically 2013) that by default it will print relative paths for source files and absolute paths for header files. As an example I have a VS project containing the following: Solution Project Headers foo.h Sources main.cpp Both main.cpp and foo.h are in the same directory on disk. main.cpp: #include <iostream> #include <string> #include "foo.h" int main(int, char*[]) { std::cout << __FILE__ << std::endl; foo::bar(

How do I configure MSVC to show relative path for header files using __FILE__?

喜夏-厌秋 提交于 2020-05-01 16:09:48
问题 I recently discovered that when using the __FILE__ predefined macro in MSVC (specifically 2013) that by default it will print relative paths for source files and absolute paths for header files. As an example I have a VS project containing the following: Solution Project Headers foo.h Sources main.cpp Both main.cpp and foo.h are in the same directory on disk. main.cpp: #include <iostream> #include <string> #include "foo.h" int main(int, char*[]) { std::cout << __FILE__ << std::endl; foo::bar(

How is “Microsoft Build Tools 2015” different from “Visual C++ Build Tools 2015”?

只谈情不闲聊 提交于 2020-04-30 11:46:31
问题 In order to compile a few Python modules, following https://wiki.python.org/moin/WindowsCompilers, I just tried to install "Microsoft Visual C++ 14.0 standalone: Visual C++ Build Tools 2015 (x86, x64, ARM)". I found the installer here Microsoft Build Tools 2015, but: strangely the Full installer "BuildTools_Full.exe" (not Net install) is only 24.4 MB, and ~ 124 MB once installed (so obviously all the SDK is not installed) This option: "Windows SDK": Install Microsoft Visual C++ Build Tools

How is “Microsoft Build Tools 2015” different from “Visual C++ Build Tools 2015”?

谁说胖子不能爱 提交于 2020-04-30 11:43:14
问题 In order to compile a few Python modules, following https://wiki.python.org/moin/WindowsCompilers, I just tried to install "Microsoft Visual C++ 14.0 standalone: Visual C++ Build Tools 2015 (x86, x64, ARM)". I found the installer here Microsoft Build Tools 2015, but: strangely the Full installer "BuildTools_Full.exe" (not Net install) is only 24.4 MB, and ~ 124 MB once installed (so obviously all the SDK is not installed) This option: "Windows SDK": Install Microsoft Visual C++ Build Tools

DLL Injection with CreateRemoteThread

寵の児 提交于 2020-04-29 06:15:09
问题 If you take a look at the following working code of a simple DLL injection: //Open the target process with read , write and execute priviledges Process = OpenProcess(PROCESS_CREATE_THREAD|PROCESS_QUERY_INFORMATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION, FALSE, ID); //Get the address of LoadLibraryA LoadLibrary = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); // Allocate space in the process for our DLL Memory = (LPVOID)VirtualAllocEx(Process, NULL,

How to install Visual Leak Detector on Visual Studio 2019?

戏子无情 提交于 2020-04-17 22:09:40
问题 I run setup file from Releases, and tried to follow official guide, but it has instructions for older versions only (Visual C++ 2010/2012/2013). I didn't find menus mentioned there. So how do I install vld on VS 2019? 回答1: Suppose install path of VLD is C:\Program Files (x86)\Visual Leak Detector Configure your project in order to use VLD when build Debug Win32 : Open Project Properties Select Configuration: Debug , Platform: Win32 Open Configuration Properties VC++ Directories Append Include

How to install Visual Leak Detector on Visual Studio 2019?

时光怂恿深爱的人放手 提交于 2020-04-17 22:09:32
问题 I run setup file from Releases, and tried to follow official guide, but it has instructions for older versions only (Visual C++ 2010/2012/2013). I didn't find menus mentioned there. So how do I install vld on VS 2019? 回答1: Suppose install path of VLD is C:\Program Files (x86)\Visual Leak Detector Configure your project in order to use VLD when build Debug Win32 : Open Project Properties Select Configuration: Debug , Platform: Win32 Open Configuration Properties VC++ Directories Append Include

how to define a good/perfect New function to init any class/struct in C++?

。_饼干妹妹 提交于 2020-04-17 21:53:36
问题 struct object { void Name() {} }; struct ABC:object { //Note:did not declare any constructor and base class is object std::byte a; const std::string* b; int c; } struct BCD { //Note:did not declare any constructor and none base class std::byte a; const std::string* b; int c; } i want the New function accept: New<ABC>({12,"first",123}); New<ABC>(a,b,c); New<BCD>({12,"first",123}); New<BCD>(a,b,c); this is my New function define: template <class _Ty, class... _Types, std::enable_if_t<!std::is

how to define a good/perfect New function to init any class/struct in C++?

我是研究僧i 提交于 2020-04-17 21:51:26
问题 struct object { void Name() {} }; struct ABC:object { //Note:did not declare any constructor and base class is object std::byte a; const std::string* b; int c; } struct BCD { //Note:did not declare any constructor and none base class std::byte a; const std::string* b; int c; } i want the New function accept: New<ABC>({12,"first",123}); New<ABC>(a,b,c); New<BCD>({12,"first",123}); New<BCD>(a,b,c); this is my New function define: template <class _Ty, class... _Types, std::enable_if_t<!std::is