Process Hacker Discussion Forum

 
User avatar
AltF4
Member
Posts: 77
Joined: 15 Mar 2011 00:53
OS: XP SP3

[Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

13 Nov 2018 20:16

I've downloaded the latest code from the github https://github.com/processhacker/processhacker
and I can compile fine in Debug (for Win32 and x64). However when switching to Release, the linker complains about noarg.obj: " Error LNK1181 cannot open input file 'noarg.obj' "

I've removed it from both the ProcessHacker and peview via \Linker\All Options: 'Additional Dependencies'
But it then just complains about next items in the list noenv.obj, etc

I've compared the command lines for the linker side by side from Debug and Release, and they have the same files, and just about the same switches.
What can I try next? Thank you!
 
User avatar
dmex
Admin
Posts: 1700
Joined: 17 Jan 2011 05:43

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

13 Nov 2018 20:51

AltF4 wrote: 13 Nov 2018 20:16
the linker complains about noarg.obj: " Error LNK1181 cannot open input file 'noarg.obj' "
You need to install the "Windows Universal CRT SDK" in the Visual Studio Installer -> Individual Components > 'Compilers, build tools, and runtimes'?
 
User avatar
AltF4
Member
Posts: 77
Joined: 15 Mar 2011 00:53
OS: XP SP3

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

13 Nov 2018 21:20

Hmm ok I’ll try it, thanks for the quick reply dmex!
 
User avatar
dmex
Admin
Posts: 1700
Joined: 17 Jan 2011 05:43

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

14 Nov 2018 07:16

AltF4 wrote: 13 Nov 2018 21:20
Hmm ok I’ll try it, thanks for the quick reply dmex!
Did it work?
 
User avatar
AltF4
Member
Posts: 77
Joined: 15 Mar 2011 00:53
OS: XP SP3

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

16 Nov 2018 21:08

dmex wrote: 14 Nov 2018 07:16
AltF4 wrote: 13 Nov 2018 21:20
Hmm ok I’ll try it, thanks for the quick reply dmex!
Did it work?

No luck yet. I downloaded and installed this - https://developer.microsoft.com/en-us/w ... ows-10-sdk
by checking all checkboxes, but no difference in being able to get past that linker error.
 
User avatar
dmex
Admin
Posts: 1700
Joined: 17 Jan 2011 05:43

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

17 Nov 2018 15:07

The standalone SDK installer doesn't include compiler components just the header files. You need to use the Visual Studio installer for installing the Universal CRT (and the Windows SDK).

I guess we can update the build scripts to check and install those components automatically? :?
 
User avatar
AltF4
Member
Posts: 77
Joined: 15 Mar 2011 00:53
OS: XP SP3

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

18 Nov 2018 02:41

Hmm, would I not already have this installed if I have Visual Studio already?
 
User avatar
AltF4
Member
Posts: 77
Joined: 15 Mar 2011 00:53
OS: XP SP3

Re: [Help] Cannot compile in Release mode (LNK1181), but Debug works well ?

18 Nov 2018 04:42

I've just installed it via Visual Studio, but still no luck with Release-specific compiling

Did the following:

appwiz.cpl --> Visual Studio --> Change --> Invidiual components (tab) --> Scroll down half way to the group: " Compilers, build tools, and runtimes" --> Check: Windows Universal CRT SDK