Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 13-03-2020, 05:25   #2551
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

That might be a very good reason to keep Mingw builds, but aren't there other dependencies, or is it just that MSVC is dropping it?
rgleason is offline   Reply With Quote
Old 17-03-2020, 02:56   #2552
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 320
Re: Beta Test / Technical

I understand from various posts that some issues with 5.0.0 have already been solved but are currently only available via github which requires compilation.
Can anyone advise if such intermediate versions (and plugins) will be made available for downloads as beta versions from opencpn.org and what may be the timescale to be expected?
skipperearly is offline   Reply With Quote
Old 17-03-2020, 04:15   #2553
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,245
Re: Beta Test / Technical

skipper..
more info here:

https://www.cruisersforum.com/forums...ml#post3095907
Hakan is offline   Reply With Quote
Old 24-03-2020, 00:44   #2554
Registered User

Join Date: Mar 2011
Posts: 718
Re: Beta Test / Technical

Can someone confirm the expected behaviour of the PluginAPI SetPositionFix.

From my observations, irrespective of the speed unit preferences (Kts, mph, km/h, m/s), the Plugin_Position_Fix member variable Sog is always sent as Kts.
stevead is offline   Reply With Quote
Old 07-04-2020, 08:04   #2555
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

A new plugin I am working on needs to download a file in the background and trap the download event, as used in the Chart Downloader plugin of OpenCPN.

Code:
error LNK2019: unresolved external symbol "int wxEVT_DOWNLOAD_EVENT" (?wxEVT_DOWNLOAD_EVENT@@3HA) referenced in function
How can I reference 'wxEVT_DOWNLOAD_EVENT' from 'ocpn_plugin.h'

Code:
#ifdef MAKING_PLUGIN
extern   DECL_IMP wxEventType wxEVT_DOWNLOAD_EVENT;
#else
extern   DECL_EXP wxEventType wxEVT_DOWNLOAD_EVENT;
#endif
Help would be appreciated.
Thanks.
Mike
Rasbats is offline   Reply With Quote
Old 07-04-2020, 14:42   #2556
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 1,077
Re: Beta Test / Technical

I think you will have to do the whole download, including events, in your own plugin. Unless the Chart downloader has an API that you can use to get the events I am not sure there is a way to get an event in another plugin (or even the mainline without 'hacking').
jongough is offline   Reply With Quote
Old 07-04-2020, 16:34   #2557
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: Beta Test / Technical

Rasbats...


The API-offered download functions work correctly. You should be able to catch the events in your code.


However....

There is a build problem, though, with the wxEVT_DOWNLOAD_EVT. I cannot recall the details at the moment. No time available right now to debug...



Please check the chart downloader source code carefully, and try to replicate its definitions. It is known to work.


Dave
bdbcat is offline   Reply With Quote
Old 10-04-2020, 11:23   #2558
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

Dave ...

To make 'wxEVT_DOWNLOAD_EVT' work I needed to add '#define MAKING_PLUGIN' to the top of 'ocpn_plugin.h'.

On compiling there was an error and '#include <wx/dcmemory.h>' was also needed in 'ocpn_plugin.h'.

Code:
#define MAKING_PLUGIN     

#ifdef __WXMSW__
#ifdef MAKING_PLUGIN
#  define DECL_IMP     __declspec(dllimport)
#endif
#endif    

#include <wx/xml/xml.h>

#ifdef ocpnUSE_SVG
#include "wxSVG/svg.h"
#endif // ocpnUSE_SVG

#include <memory>
#include <vector>
 #include <wx/dcmemory.h>
Perhaps 'MAKING_PLUGIN' could have been added to 'CMakeLists.txt': TO_TRY.

Mike
Rasbats is offline   Reply With Quote
Old 10-04-2020, 12:18   #2559
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Mike,

You define the MAKiNG_PLUGIN on the command line of CMAKE or in cmakelists.txt. There is need to edit ocpn_plugin.h.
transmitterdan is offline   Reply With Quote
Old 10-04-2020, 13:39   #2560
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

tdan ...

Thanks. Adding the definition to 'CMakeLists.txt' works.

Still needed to add '#include <wx/dcmemory.h>' to 'ocpn_plugin.h'.

Could this be added elsewhere?

Mike
Rasbats is offline   Reply With Quote
Old 11-04-2020, 08:12   #2561
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Quote:
Originally Posted by Rasbats View Post
tdan ...

Thanks. Adding the definition to 'CMakeLists.txt' works.

Still needed to add '#include <wx/dcmemory.h>' to 'ocpn_plugin.h'.

Could this be added elsewhere?

Mike
Mike,

I don't think any other plugin complains about wx/dcmemory.h so probably this is something best relegated to the plugin code itself rather than editing ocpn_plugin.h.

In general, it is a bad idea to edit ocpn_plugin.h since this file is supplied by opencpn and not the plugin developer. It will change from time to time thus losing the local edits.
transmitterdan is offline   Reply With Quote
Old 12-04-2020, 02:11   #2562
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

tdan ...

Tried using the include in a load of other places without result.

Quote:
4>c:\plugins - wxwidgets 3.1.2\sailawaynmea_pi\src\ocpn_plugin.h(418): error C2061: syntax error: identifier 'wxMemoryDC'
Had the same issue with 'Survey_pi' when compiling with OpenCPN 5.0 beta.

https://www.cruisersforum.com/forums...?p=2827145#147

Perhaps this is linked with my using Visual Studio Community 2017?

Mike
Rasbats is offline   Reply With Quote
Old 12-04-2020, 06:31   #2563
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Quote:
Originally Posted by Rasbats View Post
tdan ...

Tried using the include in a load of other places without result.

Had the same issue with 'Survey_pi' when compiling with OpenCPN 5.0 beta.

https://www.cruisersforum.com/forums...?p=2827145#147

Perhaps this is linked with my using Visual Studio Community 2017?

Mike
Mike, I apologize for not looking earlier. In the latest github master ocpn_plugin.h does include <wx/dcmemory.h> at line 48. Something must be wrong with the copy you have. Where did you get ocpn_plugin.h?
transmitterdan is offline   Reply With Quote
Old 12-04-2020, 07:58   #2564
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

Downloaded OpenCPN 5.0.0 source code and used the 'ocpn_plugin.h' from that source. Same problem with 'dcmemory.h'.

When time allows I will compile and use OpenCPN 5.0.5 alpha and see if the problem persists. No 5.0.5 'opencpn.lib' for testing with the 5.0.5 master 'ocpn_plugin.h' at the moment.

Mike
Rasbats is offline   Reply With Quote
Old 13-04-2020, 10:41   #2565
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

Tested with latest 5.0.522 'opencp.lib' and 'ocpn_plugin.h'. The new plugin compiled fine without modifying 'ocpn_plugin.h'.

Mike
Rasbats is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta Marine Diesel michaelmrc Engines and Propulsion Systems 48 23-03-2016 13:44
Need some technical advice....antennas. Just a Tinch Marine Electronics 15 01-12-2007 15:57
Blue Sea Systems Technical Brief GordMay Electrical: Batteries, Generators & Solar 0 16-03-2007 04:16
technical difficulties witchcraft The Sailor's Confessional 1 30-05-2005 14:09
Dow Corning Technical Manual GordMay The Library 0 12-04-2005 16:25

Advertise Here


All times are GMT -7. The time now is 08:34.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.