Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Compiling the 64bit template in release mode for VS2017 gives some errors

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 19th Jan 2018 10:39
I just compiled the bog standard template 64 bit version in VS2017 in release mode gave me some erros in core.cpp. Do they matter? Will they be fixed?

1>------ Build started: Project: Template, Configuration: Release x64 ------
1>Core.cpp
1>Core.cpp(482): warning C4244: 'argument': conversion from 'WPARAM' to 'unsigned int', possible loss of data
1>Core.cpp(500): warning C4244: 'argument': conversion from 'WPARAM' to 'unsigned int', possible loss of data
1>Core.cpp(510): warning C4244: 'argument': conversion from 'WPARAM' to 'unsigned int', possible loss of data
1>Core.cpp(517): warning C4244: 'argument': conversion from 'WPARAM' to 'unsigned int', possible loss of data
1>Core.cpp(524): warning C4244: 'argument': conversion from 'WPARAM' to 'unsigned int', possible loss of data
1>Core.cpp(535): warning C4244: 'argument': conversion from 'WPARAM' to 'unsigned int', possible loss of data
1>template.cpp
1>Generating Code...
1>Template.vcxproj -> D:\AGK C++ libs\apps\template_windows_vs2017_64\Final\Template64.exe
1>Done building project "Template.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
13/0
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 19th Jan 2018 12:47
Well, I set up the project as described in the new Tier 2 tutorials from TGC, I don't get the error now.
13/0
puzzler2018
User Banned
Posted: 19th Jan 2018 14:41
You mentioned VS2017 - I think there was a generally bug in 2017 (not agk) of which cannot be used on 2017 until this is fixed by microsoft.

From what i understand anyway

whether thats the case these days i dont know.others (Paul) maybe able to clarify
TomToad
6
Years of Service
User Offline
Joined: 6th Jan 2018
Location:
Posted: 20th Jan 2018 01:28
You are getting warnings because the argument passed to the TranslateKey() function is defined as a WPARAM type, but the function expects an unsigned int. The reason why it "works" now is that when core.cpp is compiled to object code, it is not compiled again until core.cpp gets modified again. Try clicking on Build->Rebuild Solution from the menu and you will see the warnings pop back up. Since WPARAM is just typedef as an unsigned int anyway, the warnings can be safely ignored.
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 20th Jan 2018 07:02
Quote: "Well, I set up the project as described in the new Tier 2 tutorials from TGC, I don't get the error now."

Cool, glad you've found these useful!

Regarding the warnings, they don't matter in this case so you can ignore them. If they annoy you, or you want to compile with warnings as errors, you can just make the casts explicit on the lines mentioned in the warnings.

Quote: "You mentioned VS2017 - I think there was a generally bug in 2017 (not agk) of which cannot be used on 2017 until this is fixed by microsoft."

You're right that there was a bug that held up the AppGameKit VS2017 release but that's resolved now so the current version of AppGameKit includes the 2017 templates.
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Jan 2018 10:02
Quote: " The reason why it "works" now is that when core.cpp is compiled to object code, it is not compiled again until core.cpp gets modified again. Try clicking on Build->Rebuild Solution from the menu and you will see the warnings pop back up."


You are right, the error came back, good to know that previously compiled files won't get compiled again unless modified I am learning C++ at the moment, I am going through http://www.learncpp.com
13/0
RobbSnow
9
Years of Service
User Offline
Joined: 14th Oct 2015
Location:
Posted: 22nd Jan 2018 20:48
That is just a warning and not an error.
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 23rd Jan 2018 08:09
Quote: "That is just a warning and not an error."


Right you are
13/0

Login to post a reply

Server time is: 2024-11-24 03:59:22
Your offset time is: 2024-11-24 03:59:22