Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build? #7

Open
tiborepcek opened this issue Feb 13, 2018 · 11 comments
Open

How to build? #7

tiborepcek opened this issue Feb 13, 2018 · 11 comments

Comments

@tiborepcek
Copy link

Hi. Would you please write more specific instructions, how to build your software? I dont exactly know what to do with "msbuild /p:platform=win32 /p:Configuration=Release". Thank you. :)

@i-give-up
Copy link

You have to install a version of Visual Studio (can be regular Visual Studio, Visual Studio Community, or just Build Tools).

After installing that, there will be some shortcuts in your Start Menu that says "... Native Tools Command Prompt" or "... Native Build Tools Command Prompt". Click one of them - not sure if x86 or x64 matters or not.

In the new console, navigate to the KeyCastOW project folder. Then try running

msbuild /p:platform=win32 /p:Configuration=Release

In my case I got this error (probably due to difference in Visual Studio version)

error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be
found. To build using the v120 build tools, please install v120 build tools.
Alternatively, you may upgrade to the current Visual Studio tools by selecting
the Project menu or right-click the solution, and then selecting "Retarget
solution".

I found the fix on Stack Overflow answer

So I ended with this

msbuild /p:platform=win32 /p:Configuration=Release /p:PlatformToolset=v141

You can find the PlatformToolset value for various Visual Studio versions on the
linked Stack Overflow answer.

If compilation is successful, you can find "keycastow.exe" in the "Release" sub folder.

@victorwestmann
Copy link

Is this possible to be built using DevC++ portable version? Just wondering.

@jeansagi
Copy link

jeansagi commented Jun 8, 2018

Well I'm stuck here on building an executable file for KeycastOW. Maybe someone can help.

BTW I installed Visual Studio 2017 Community edition "just" to generate an an executable of KeycastOW.
I've tried carnac but their latest version is unmanageable to me and it seems abandonware !!

So I cloned this project from the github repository and got the error pointed here by i-give-ip when I tried to build it. So I followed their instructions and tried "msbuild /p:platform=win32 /p:Configuration=Release /p:PlatformToolset=v141" but that also failed pointing that the Windows 8.1 SDK isn't installed.

I verified in the installer and it wasn't installed by default so I installed it and tried again with "msbuild /p:platform=win32 /p:Configuration=Release /p:PlatformToolset=v141", but this time the error changed to:

keycast.cpp c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory

keylog.cpp c:\users\jean\source\repos\keycastow\keylog.cpp(4): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory

Looking for error C1083 seems that Windows 8.1 SDK and Visual Studio 2017 doesn't behave too well...

All in all I think that the "Retarget" procedure mentioned in the original error (Platform Toolset = 'v120') seems the real problem... To me is the more logical route... I mean this program should use the Windows 10 SDK not the Windows 8.1 one.

So I've tried to "Retarget" the project but for the life of me that I've not been able to do it. It seems that this Retarget option is only available when you have a Visual Studio "Solution"... and you do not get a solution when you clone the KeycastOW repository in Visual Studio nor I haven't found a way to create a solution for the project...

As anyone may have guessed by now "I'm totally new" to this Visual Studio thing, So a little help would be GREATLY appreciated.

I really liked what I've seen from KeycastOW but after reading a lot I haven't figured it out how to compile it in order to use it...

BTW: As someone said it would be great to have binaries for this application... it would help my nerves a lot ;)

Thanks in advance,

J.

@jeansagi
Copy link

jeansagi commented Jun 9, 2018

Well, I figure it out how to overcome the problems I had in visual studio 2017 to build KeycastOW .

Since the instructions of i-give-up didn't worked with my environment I opted for the "Retarget solution" hint given by the build process (error MSB8020).

For what I've saw my hassle with the "Retarget solution" is that it needs that a visual studio solution exists beforehand (otherwise you have no way to the choose "retarget option"), and KeycastOW didn't come with such a solution for Visual Studio.

So I created a "Blank Solution" in visual studio and added the KeycastOW project to it. Then I had the visual studio solution, and after right-clicking it there was the "Retarget option". I chose to retarget to v141 and that was all !.

The project now builds and generates a .exe (187904 bytes) that works !! (Beautifully BTW !!).

J.

@codeditor2
Copy link

hi, buddy, you can refer this blog to build KeyCastOW

@VanFPGA
Copy link

VanFPGA commented Mar 13, 2019

Thank you jeansagi, you saved the day :) YAY!!
To add something on my own about NopToGiveUp:

  1. After having Visual Studio community 2017 installed, I tried first the menu: Tools => External Tools as per linked-blog above by rudy-yuan, however the "Command prompt"... was not present.
  2. So I did it the jeansagi way.

Start Page - Microsoft Visual Studio  2019-03-12 5_32_40 PM

add project

ROUND OF APPLAUSE FOR BROOKHONG!

@jeansagi
Copy link

Thank you jeansagi, you saved the day :) YAY!!
To add something on my own about NopToGiveUp:

  1. After having Visual Studio community 2017 installed, I tried first the menu: Tools => External Tools as per linked-blog above by rudy-yuan, however the "Command prompt"... was not present.
  2. So I did it the jeansagi way.

Start Page - Microsoft Visual Studio 2019-03-12 5_32_40 PM

add project

ROUND OF APPLAUSE FOR BROOKHONG!

Glad to know my comment helps.

J.

@FrankFang
Copy link

I failed to build it.
Sorry, maybe http://code52.org/carnac/

@jeansagi
Copy link

As I said:

I've tried Carnac but their latest version is unmanageable to me and it seems abandonware !!

Carnac is an option and it has binaries which facilitate its use, you even have access to its GitHub repository... So the option is yours.

Regarding KeyCastOW you should share you build problems and maybe someone could help.

J.

@stephen147
Copy link

stephen147 commented Jun 22, 2019

Regarding KeyCastOW you should share you build problems and maybe someone could help.

J.

Thanks, I'll take you up on that offer. I've posted a new thread here. Maybe you could help. #15

Sorry, maybe http://code52.org/carnac/

Man, this looks cool. Thanks.

Still would like some help with my issue.

@stephen147
Copy link

Still would like some help with my issue.

Got help over on stackoverflow https://stackoverflow.com/a/56726874/8262102

Updating the project file with the solution above works in 2019.

@Lemmingh Lemmingh mentioned this issue Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants