Does MSVC ASan Support x64 builds? - visual-c++

I'm trying to run my program through ASan on MSVC (fsantitize=address) and I keep getting runtime errors from the ASan dlls. Has anyone been able to get ASan working with runtime set to MDd and platform set to x64?
Windows 11
MSVC 2019 - 16.11.2

Related

MinGW on windows gcc compiler to create 64 Bit DLL for a nodejs (ffi-napi)

I am using a sample program from https://www.npmjs.com/package/ffi-napi A Node.js Foreign Function Interface for N-API factorial.c is there a way to compile a sample C(factorial_lib.c) program as a windows 64Bit .DLL I am using gcc under windows( MinGW installed, not cygwin) ,
no luck: gives error, it seems the following is compiling it into 32BIT need to know how to change the gcc default compilation into 64bit windows DLL
gcc -c -DBUILD_DLL factorial_lib.c
gcc -shared -o factorial.dll factorial_lib.o
PLEASE HELP , I have tried MS VSC compile and ran into issues
MinGW does not support 64-bit Windows. MinGW-w64 does support both 32-bit and 64-bit Windows. You can download a standalone version from http://winlibs.com/.

Configuring arangodb failed in CentOS 5

I need to porting ArangoDB to centos 5 system, I have updated python to 2.7.13 and cmake to 3.91, but during cmake executing, below error message appeared
-- Will compile in hand-optimized assembler code for CRC32.
CMake Error at arangod/CMakeLists.txt:448 (target_compile_features):
target_compile_features The compiler feature "cxx_constexpr" is not known
to CXX compiler
"GNU"
version 4.1.2.
-- building for git revision:
-- Configuring incomplete, errors occurred!
does someone know how about this error?
ArangoDB requires a compiler which supports C++ 11 standard. You will need gcc 4.8 and above. The above error is informing you that your compiler does not recognise the constexpr keyword. Also please note that Centos 5 has expired as of March 2017 (https://www.centos.org/forums/viewtopic.php?t=57398) and should really not be operated anymore. However, if there really is no way around Centos 5, here is a docker container offering gcc 4.8 in Centos 5.

Setting up MSVC compiler in Qt Creator

I recently downloaded Qt 5.3.2 for Windows 64 bit (offline installation). I installed it and when I ran a simple console program in the IDE, an error propped up saying that Qt Creator needs a compiler set up to build. Now how do I configure Qt Creator for compiling with MSVC 2013?

C1905/LNK1257 Combining x64 Release Libraries

I have set up static library builds of zlib and libpng. Both compile fine into .lib files. I am using MSVC 2010.
With this setup, to use libpng.lib, you need to link against zlib.lib as well. To avoid this, I'm trying to use lib.exe to link zlib into libpng directly. My invocation looks like:
call "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/lib.exe" /OUT:x64\Release\libpng2.lib x64\Release\libpng.lib ..\zlib\x64\Release\zlib.lib /LTCG
In both of their project settings, I explicitly set "Librarian->General->Target Machine" to MachineX64. And, using dumpbin, I can check that the relevant zlib.lib and libpng are both compiled for x64.
Additionally, "General->Whole Program Optimization" and "C/C++->Optimization->Whole Program Optimization" have identical values.
The problem only occurs for x64 Release configurations. x86 Debug, x86 Release, and x64 Debug all work fine.
EDIT: Specifically, the problem is that I get a C1905/LNK1257 error:
C1905: Front end and back end not compatible (must target same processor).
LNK1257: code generation failed
I ran into this problem with VS2012. The lib.exe you're calling is part of the x86 tools. In the amd64 subfolder in VC/bin you will find the x64 versions. Opening a Visual Studio x64 Win64 Command Prompt will set your PATH correctly or you can call the x64 lib.exe directly, specifying its full path as you are doing now.

How to get a 64 bit dll with c source file, def file, link file by using command line in vc 6.0

My compile environment is windows xp and vc 6.0.
Now I have a c source file(msgRout.c), def file(msgRout.def), link file(msgRout.link), then I use commands below to get a 32 bit dll:
1.cl /I ../include -c -W3 -Gs- -Z7 -Od -nologo -LD -D_X86_=1 -DWIN32 -D_WIN32 -D_MT -D_DLL msgRout.c
2.lib -out:msgRout.lib -def:msgRout.def -machine:i386
3.link /LIBPATH:../../Lib -nod -nologo -debug:full -dll #msgRout.link -out:msgRout.dll
But the dll I got cannot be loaded on X64 application. it required a 64 bit dll.
So here is my question:
Can I get a 64 bit dll with vc 6.0?
Using only above 3 commands alike, how can I get 64 bit dll?
Many GREAT THANKS!!!
Allan
Visual C++ 6.0 does not include 64-bit compiler/libraries. You will need either a more recent version of Visual C++ or a Windows Platform SDK that has the 64-bit support. The earliest one is the Windows Server 2003 Platform SDK.
Once you have that installed, cl /? and link /? will have info on how to build 64-bit apps.
Update: If you have VS2005, you can build 64-bit binaries with the x86-amd64 cross-compiler (a 32-bit cl.exe that produces 64-bit code) or with the x64 compiler (a 64-bit cl.exe). To do that, you need to:
Make sure you've installed the 64-bit tools support during VS installation.
Open a command line and set it for x86-amd64 builds using C:\Program Files\Microsoft Visual Studio 8\VC\Vcvarsall.bat x86_amd64 or
(on 64-bit Windows) Open an x64 command line and set it for 64-bit builds using C:\Program Files\Microsoft Visual Studio 8\VC\Vcvarsall.bat amd64.
Once you do that, you should be able to use the same command line as above (with tcouple small changes - for cl you'll have to define /D:X64=1 or /D_AMD64_ and for link you'll have to change the /machine:x86 to /machine:x64) to produce 64-bit version of your program.
Here are some links with more information:
Installing Visual Studio 64-bit Components
HowTo: Enable a 64-Bit Visual C++ Toolset at the Command Line
Use Visual Studio to build 64-bit application
64-bit Applications
Seven Steps of Migrating a Program to a 64-bit System
You cannot. Microsoft does not have time machines.

Resources