Comments on: Position https:/code-sample/position/ Developer resources for the X-Plane flight simulator Mon, 04 Jan 2021 21:40:59 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Thomas https:/code-sample/position/#comment-35277 Mon, 09 Mar 2020 21:19:04 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8051#comment-35277 In reply to Wiktor.

Just so others know, in order to fix this error for X-Plane 11 64-bit, all you need to do is to replace the SDK subfolder in this example package with the official SDK v3, which is 64 bit compatible. The problem is to do with the fact that the sample was updated for the 64-bit, but the included SDK was not.

]]>
By: Jerry Thorusen https:/code-sample/position/#comment-31421 Fri, 08 Jun 2018 20:08:53 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8051#comment-31421 I tried to post a reply to this once already, hopefully this doesn’t end up as a duplicate but I don’t see my reply so I will try once more….
It may be a little late since its been a couple of months since the question was posted – but I was able to successfully compile this example in Visual Studio 2017 by changing the error line (line 264 in position.cpp) as follows:

XPAddWidgetCallback(PositionWidget, (XPWidgetFunc_t) PositionHandler);

I also had to add a path to the SDK libraries in order to get the project to link (i.e. to complete the build)
e.g. C:…..\SDK\Libraries\Win\XPLM_64.lib
(See project properties menu, linker category, general sub-category, additional directories entry.)

]]>
By: Jerry Thorusen https:/code-sample/position/#comment-31420 Fri, 08 Jun 2018 18:18:47 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8051#comment-31420 This may be untimely since it has been a few months since the original question…

But I was able to compile in Visual Studio 2017 by correcting the error line (line # 254 in positon.cpp)
as follows:
XPAddWidgetCallback(PositionWidget, (XPWidgetFunc_t) PositionHandler);

I also had to add the library path from the SDK (e.g. C:…\X-Plane SDK\SDK\Libraries\Win) to the project properties to get it to link.

]]>
By: Wiktor https:/code-sample/position/#comment-26253 Thu, 01 Mar 2018 21:03:37 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8051#comment-26253 Hi, I have copied this plugin to visual studio 2017 and after adding libraries and other paths I tried to compile it. Here is a message:

‘void XPAddWidgetCallback(XPWidgetID,XPWidgetFunc_t)’: cannot convert argument 2 from ‘int (__cdecl*)(XPWidgetMessage,XPWidgetID,intptr_t,intptr_t)’ to ‘XPWidgetFunc_t’

I have no idea what to do and how to solve this issue.

]]>