0

trying to build perl in windows x64 machine using nmake in VS 2022 developer command prompt , while running nmake the nmake.exe is picking up from x86 path resulting in error: module machine type 'x64' conflicts with target machine type 'X86'

i have added x64 path in environment variables and with where nmake its giving 2 paths and while making nmake its taking the exe from x86 path in the x64 machine.

C:\Program Files\Microsoft Visual Studio\2022\Professional>where nmake C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\bin\Hostx86\x86\nmake.exe C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\bin\Hostx64\x64\nmake.exe

  • you're looking at the wrong tool. NMake does not care about 32 bits or 64 bits. Instead, your compiler commandline should specify the flag for the correct architecture. – Botje Jun 05 '23 at 13:16
  • @Botje im trying to build perl in windows x64v machine, when i specified WIN64 = undef it built succesfully, when i commented it only im getting this error saying "module machine type 'x64' conflicts with target machine type 'X86'", so there must be some issue with the nmake.exe target – hema kumar v Jun 05 '23 at 13:23
  • See following for the paths for the command line : https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#path_and_environment – jdweng Jun 05 '23 at 13:25
  • 1
    Then you should edit this question with the transcript of you calling Configure and the build output. – Botje Jun 05 '23 at 13:26
  • You should not be modifying PATH yourself: the VS Developer Command Prompt sets up the correct PATH for you, plus other environment variables. – Joseph Quinsey Jun 09 '23 at 21:33

0 Answers0