Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make MS Visual C++ use LP64 instead of LLP64

I'd like to know if it's possible to make VC++ use LP64 instead of LLP64, I know I could use another compiler such as GCC or Intel C++, but I'd like to use VC++ for various reasons.

There is no requirement for compatibility with Microsoft headers, etc, and I am already using LIBC as my runtime library.

like image 557
James Avatar asked Nov 14 '22 07:11

James


1 Answers

Sometimes "You can't" is also an answer. Because it's not possible (allegedly for backwards compatibility).

Use portable types instead (#include <cstdint>):

  • int8_t - a 8-bit integer
  • int16_t - a 16-bit integer
  • int32_t - a 32-bit integer
  • int64_t - a 64-bit integer

P.S. As a possible workaround you could use Cygwin, which uses LP64 even on Windows.

like image 156
rustyx Avatar answered Dec 17 '22 10:12

rustyx