Build it with Visual Studio 2017?

Ask for help, how to use AHK_H, etc.
Guest078
Posts: 23
Joined: 28 Aug 2016, 13:44

Build it with Visual Studio 2017?

20 Apr 2017, 05:48

Is it possible to build the solution with Visual Studio 2017?

If yes can anyone post a step-by-step tutorial, how to do this?

E.g. I'm on Windows 10 and I have installed the SDK 10.0.15063.0 (latest)

When I open the .sln the first time, VS aks if the projects should be retargeted
In my case, I have two options for
Windows SDK Version: 10.0.14393.0 and 10.0.15063.0
Platform Toolset: Upgrade to v141 and No upgrade

[x] ..\lib_pcre\lib_pcre.vxproj
[x] ..\ahkdll-alpha\AutoHotkey.vcxproj

Which options to choose? and when done, which paths need to be added to
Include Directories
and
Library Directories

in AutHotkey's Properties (in VC++ Directories)

Anything else, that must be done to build it properly?
Guest078
Posts: 23
Joined: 28 Aug 2016, 13:44

Re: Build it with Visual Studio 2017?

20 Apr 2017, 11:33

I've followed that tutorial and additionally added

Code: Select all

$(VCInstallDir)Tools\MSVC\14.10.25017\include
$(WindowsSdkDir)Include\10.0.15063.0\shared
$(WindowsSdkDir)Include\10.0.15063.0\ucrt
$(WindowsSdkDir)Include\10.0.15063.0\um
To the Include Directories in VC++ Directories for the AutoHotkey project
so that it doesn't complain about not finding a few header files

But when trying to build the solution I get this:

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Warning	C4302	'type cast': truncation from 'LPWSTR' to 'WORD'	AutoHotkey	R:\ahkdll-alpha\source\script2.cpp	16213	
Warning	C4302	'type cast': truncation from 'LPWSTR' to 'WORD'	AutoHotkey	R:\ahkdll-alpha\source\AutoHotkey.cpp	56	
Warning	C4302	'type cast': truncation from 'LPWSTR' to 'WORD'	AutoHotkey	R:\ahkdll-alpha\source\AutoHotkey.cpp	132	
Warning	C4302	'type cast': truncation from 'LPWSTR' to 'WORD'	AutoHotkey	R:\ahkdll-alpha\source\script2.cpp	8478	
Warning	D9025	overriding '/D_UNICODE' with '/U_UNICODE'	AutoHotkey	R:\ahkdll-alpha\cl	1	
Warning	D9025	overriding '/DUNICODE' with '/UUNICODE'	AutoHotkey	R:\ahkdll-alpha\cl	1	
Warning	C4651	'/D_UNICODE' specified for precompiled header but not for current compile	AutoHotkey	R:\ahkdll-alpha\source\Registry.cpp	5	
Warning	C4651	'/DUNICODE' specified for precompiled header but not for current compile	AutoHotkey	R:\ahkdll-alpha\source\Registry.cpp	5	
Warning	LNK4010	invalid subsystem version number 5; default subsystem version assumed	AutoHotkey	R:\ahkdll-alpha\LINK	1	
Error	LNK1104	cannot open file 'LIBCMT.lib'	AutoHotkey	R:\ahkdll-alpha\LINK	1	
A file named LIBCMT.lib doesn't exist on the system...
User avatar
Taurus
Posts: 94
Joined: 20 Jan 2015, 10:31

Re: Build it with Visual Studio 2017?

21 Apr 2017, 15:32

Hi, i tried the same. Use "Win 10 SDK 10.0.14393.0" and it will work. I did not find a solution for the newer win update, but i will update my tutorial, if i found one.
:beard: Full Stack Developer > Dev for a better world | PHP for Web | AHK H for Local | with KISS (Keep IT Short and Simple) on Win 10 Pro (Version 2004) x64

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 52 guests