Closed ahmedfamhy3 closed 1 year ago
This is because you are using the x86 Native Tools Command Prompt for Visual Studio
instead of the x64 Native Tools Command Prompt for Visual Studio
. The makefile is configured for 64-bit by default. To compile for 32-bit, do a find-and-replace in the makefile for "64" -> "32".
`C:\Users\Ahmed\Desktop\donut>nmake -f Makefile.msvc
Microsoft (R) Program Maintenance Utility Version 14.34.31937.0 Copyright (C) Microsoft Corporation. All rights reserved.
Could Not Find C:\Users\Ahmed\Desktop\donut\lib\donut.lib
Building exe2h
exe2h.c mmap-windows.c Generating Code...
Building loader
loader.c hash.c encrypt.c depack.c clib.c Generating Code... link -nologo -order:@loader\order.txt -entry:DonutLoader -fixed -subsystem:console -nodefaultlib loader.obj hash.obj encrypt.obj depack.obj clib.obj exe2h loader.exe [ Found valid DOS and NT header. [ Locating .text section. [ saved code to loader_exe_x86.h [ saved code to loader_exe_x86.go
Building generator
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 Copyright (C) Microsoft Corporation. All rights reserved.
donut.c hash.c encrypt.c format.c clib.c Generating Code... donut.obj : error LNK2019: unresolved external symbol _aP_pack referenced in function _compress_file donut.obj : error LNK2019: unresolved external symbol _aP_workmem_size referenced in function _compress_file donut.obj : error LNK2019: unresolved external symbol _aP_max_packed_size referenced in function _compress_file lib\aplib64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' donut.exe : fatal error LNK1120: 3 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX86\x86\cl.EXE"' : return code '0x2' Stop.`