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 05-08-2015, 15:12   #1
Registered User

Join Date: Aug 2015
Posts: 17
OpenCPN Development

Hi,

I am a new user of OpenCPN and love it already. I am also a software developer and am very keen to develop plugins for some racing oriented apps along the lines of expedition and Decman.

I have followed the windows compilation guidelines to the letter and successfully compiled the product and some of the common plugins (polar, statusbar, wmm etc. However, the plugins do not run in under any installation of OpenCPN from 4.0.0 to 4.1.718. I get error messages from incompatible icon graphics to ungraceful crashes.

I did not manage to compile the 4.0.0 release because of errors in the ocpn_pixel.cpp, printtable.cpp and jsonval.cpp. These are undeclared identifiers due to graphics base #ifdef's.

Am I missing something fundamental here? Are there any guidelines that some of you more seasoned developers can give me? Or are there old forums explaining the pitfalls that I can't find?

I have spent a few days working on this and am now at the stage where it's get some help or give up.

Thanks

Cags
Cags is offline   Reply With Quote
Old 05-08-2015, 16:56   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,609
Re: OpenCPN Development

cags...

You will first need to figure out why O4.0 does not build for you. Whatever the problem is there, it will propagate to the PlugIns.

So, lets see some build output errors, please.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 06-08-2015, 03:03   #3
Registered User

Join Date: Aug 2015
Posts: 17
Re: OpenCPN Development

Thanks for getting back to me Dave. Here is a link to a re-build output file...

http://www.compustat.ie/error.txt

This has been done on a W7-64 machine and with all of the peripheral suggestions in the compile instructions. (wx302, vce2013 etc.)

I can see the first few errors are conditional includes to do with MSW graphics but beyond that I'm a bit lost.

Cags
Cags is offline   Reply With Quote
Old 06-08-2015, 03:19   #4
Registered User

Join Date: Aug 2015
Posts: 17
Re: OpenCPN Development

Thanks for getting back to me Dave,
Here is the end of the re-build output on a release build (debug is the same).
I can see the first few error are on a conditional compilation but beyond that, barring, changing the condition, I'm a bit lost.
Thanks
David

Build FAILED.

"C:\Development\OpenCPN\build\ALL_BUILD.vcxpro j" (default target) (1) ->
"C:\Development\OpenCPN\build\plugins\dashboard_pi \dashboard_pi.vcxproj" (default target) (8) ->
"C:\Development\OpenCPN\build\opencpn.vcxproj" (default target) (10) ->
(ClCompile target) ->
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1182): error C2065: 'm_oldBitmap' : undeclared identifier [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1184): error C2065: 'm_oldBitmap' : undeclared identifier [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1185): error C2065: 'm_selectedBitmap' : undeclared identifier [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1185): error C2228: left of '.Ok' must have class/struct/union [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1190): error C2065: 'm_selectedBitmap' : undeclared identifier [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1226): error C2065: 'm_oldBitmap' : undeclared identifier [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\ocpn_pixel.cpp(1228): error C2065: 'm_oldBitmap' : undeclared identifier [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\printtable.cpp(269): error C2039: 'max' : is not a member of 'std' [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\printtable.cpp(269): error C3861: 'max': identifier not found [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\printtable.cpp(281): error C2039: 'max' : is not a member of 'std' [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\printtable.cpp(281): error C3861: 'max': identifier not found [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\printtable.cpp(304): error C2039: 'max' : is not a member of 'std' [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\printtable.cpp(304): error C3861: 'max': identifier not found [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\wxJSON\jsonval.cpp(965) : error C2308: concatenating mismatched strings [C:\Development\OpenCPN\build\opencpn.vcxproj]
C:\Development\OpenCPN\src\wxJSON\jsonval.cpp(973) : error C2308: concatenating mismatched strings [C:\Development\OpenCPN\build\opencpn.vcxproj]

0 Warning(s)
15 Error(s)

Time Elapsed 00:00:04.21
Cags is offline   Reply With Quote
Old 06-08-2015, 04:45   #5
Registered User

Join Date: Apr 2013
Location: Penobscot Bay, Maine
Boat: Tayana 47
Posts: 2,125
Re: OpenCPN Development

Quote:
Originally Posted by Cags View Post
Hi,

I am a new user of OpenCPN and love it already. I am also a software developer and am very keen to develop plugins for some racing oriented apps along the lines of expedition and Decman.

I have followed the windows compilation guidelines to the letter and successfully compiled the product and some of the common plugins (polar, statusbar, wmm etc. However, the plugins do not run in under any installation of OpenCPN from 4.0.0 to 4.1.718. I get error messages from incompatible icon graphics to ungraceful crashes.

I did not manage to compile the 4.0.0 release because of errors in the ocpn_pixel.cpp, printtable.cpp and jsonval.cpp. These are undeclared identifiers due to graphics base #ifdef's.

Am I missing something fundamental here? Are there any guidelines that some of you more seasoned developers can give me? Or are there old forums explaining the pitfalls that I can't find?

I have spent a few days working on this and am now at the stage where it's get some help or give up.

Thanks

Cags
What exactly is it about OpenCPN that you love? If you, a software developer, have spent "a few days" working on trying to get it to run right, wouldn't it be better to simply purchase one of the charting programs out there that you just download and then use, especially for those of us who are not software developers? I see thread after thread about OpenCPN and most of them consist of folks talking about how to fix this or that or about computer code that means nothing to most people. What is the attraction to OpenCPN when there are so many good and inexpensive alternatives out there? I'm not asking this to dump on OpenCPN but I've never heard of any other charting software that seems to have so many problems, with seemingly never ending threads necessary to explain how it works or how to make it work. Can anyone explain to me why use OpenCPN over one of the other charting programs that are available and run pretty seamlessly?
jtsailjt is offline   Reply With Quote
Old 06-08-2015, 04:52   #6
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 723
Re: OpenCPN Development

Opencpn is under high activity development and a lot of the topics is related to this. Also, Opencpn is not only a plotter but also an advanced navigation tool far more customable and capable than most other "plotters" Also, for plain navigation, stick to the latest official realsed version who is considered "stable" You will never see beta versions and active development from a commercial provider - this will happen behind the senes and eventuyally end up in a new version relaeased - here in this forum you can see the whole process.
petter5 is offline   Reply With Quote
Old 06-08-2015, 06:03   #7
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,886
Re: OpenCPN Development

And one can - and is invited - to participate in the development.

OCPN has been downloaded far more than a million times - the (conservative) estimate is that there are more than 250.000 active users. Worldwide.
We do see see only some few here in comparison.

OCPN supports platforms from RasPis (coming) up to networked workstations. Windows, OS-X, Linux. An incredible broad zoo of connected devices - and this shows up in the threads, as there will be issues.
Much easier to have a closed system...

Which system does allow to use mixed raster and vector charts, free and encrypted, quilted and at the same instant? Not that many..
And free?

And don't forget: those who are entering in those endless threads have their fun - often - doing so.
bcn is offline   Reply With Quote
Old 06-08-2015, 07:12   #8
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: OpenCPN Development

Cags...
Are you trying to build 4.0.0 or the latest master? If 4.0.0, which makes little sense anyway, you can't do so against WX3, using the current build instructions (Second paragraph of the build instructions)

Pavel
nohal is offline   Reply With Quote
Old 06-08-2015, 07:36   #9
Registered User

Join Date: Aug 2015
Posts: 17
Re: OpenCPN Development

Pavel,

I was successfully building 4.1.xxx but could not get any recompiled plugins (including my own initial test plugin) to run properly. I then went back to 4.0.0 as a test just to get something to work.

That's news to me about using wx3 on 4.0 and indeed you're right - I did use the 4.1 build instructions. Are there 4.0.0 build instructions around that I can refer to?

I don't really care what version I have in my build environment as I just want to get busy designing a plugin. An upgrade to the latest version can happen later.

Thanks for your help.

David
Cags is offline   Reply With Quote
Old 06-08-2015, 08:09   #10
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: OpenCPN Development

David...
The plugins built against 4.1 codebase with wx3 can never work with 4.0 (and vice-versa) as they are ABI incompatible.
If you really must build 4.0 and be compatible with the officially released packages, for which I don't see much reason if you are at a point of starting to develop a plugin now, you have to use wx2.8, VS2010 and follow the old version of the instructions (http://opencpn.org/ocpn/node/108/revisions/6972/view)

Pavel
nohal is offline   Reply With Quote
Old 06-08-2015, 11:35   #11
Registered User

Join Date: Aug 2015
Posts: 17
Re: OpenCPN Development

Pavel,

That worked out fine thanks. I have 4.0.0. building and running thanks. Now (hopefully) the last two hurdles which are plugin related.

(1) When I build statusbar_pi, it compiles with no errors. When I place it in the plugins directory and run Opencpn, I get the following error dialog on clicking the Options button.
[wxWidgets Debug Alert ..\..\src\msw\bitmap.cpp(802): assert "image.Ok()" failed in wxBitmap:CreateFromImage(): Invalid Image. etc etc]

(2) Compiling wmm_pi gives me the following errors
[(ClCompile target) ->
..\src\jsonval.cpp(965): error C2146: syntax error : missing ')' before identifier 'LL' [C:\Development\wmm_pi\build\wmm_pi.vcxproj]
..\src\jsonval.cpp(966): error C2059: syntax error : ')' [C:\Development\wmm_pi\build\wmm_pi.vcxproj]
..\src\jsonval.cpp(973): error C2146: syntax error : missing ')' before identifier 'LL' [C:\Development\wmm_pi\build\wmm_pi.vcxproj]
..\src\jsonval.cpp(974): error C2059: syntax error : ')' [C:\Development\wmm_pi\build\wmm_pi.vcxproj]

Regards!

David
Cags is offline   Reply With Quote
Old 06-08-2015, 12:23   #12
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: OpenCPN Development

David...
I don't plan any more releases of the WMM plugin compatible with O4.0/wx2.8, if you really want to use the codebase nobody else will ever touch again as the base for your new development, apply the following patch to the WMM source, which will make it usable with wx2.8 again:
Code:
diff --git a/src/json_defs.h b/src/json_defs.h
index 136fb6e..b6d6a06 100644
--- a/src/json_defs.h
+++ b/src/json_defs.h
@@ -99,7 +99,7 @@
 // always use 32-bits integers also when the platform seems to
 // have native 64-bits support: by default the macro if not defined
 //
-// #define wxJSON_NO_64BIT_INT
+#define wxJSON_NO_64BIT_INT
 //
 #if defined( wxJSON_NO_64BIT_INT ) && defined( wxJSON_64BIT_INT )
 #undef wxJSON_64BIT_INT
Pavel
nohal is offline   Reply With Quote
Old 06-08-2015, 15:05   #13
Registered User

Join Date: Aug 2015
Posts: 17
Re: OpenCPN Development

Hi,

I'm not particularly attached to older versions - I simply want a build environment that allows me view existing code constructs, compile them and run them in order to familiarise myself with the technology.

So, I have gone the full circle now, built 4.1.718 all the way through to the installation package (wx-3.0.2, VS-2013). After install, I go to options, plugins and I still get crash errors from dashboard_pi and grib_pi trying to load. See the attached screenshots.

Enabling them crashes the product completely.

David
Attached Thumbnails
Click image for larger version

Name:	2015-08-06_22h01_19.png
Views:	128
Size:	6.6 KB
ID:	106830   Click image for larger version

Name:	2015-08-06_22h01_38.png
Views:	158
Size:	3.7 KB
ID:	106831  

Click image for larger version

Name:	2015-08-06_22h01_49.png
Views:	154
Size:	6.6 KB
ID:	106832  
Cags is offline   Reply With Quote
Old 06-08-2015, 16:07   #14
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: OpenCPN Development

David...
Can't reproduce your problems on my Windows builder at all. Are you sure you are not mixing Debug and Release build products, stuff built using the v120_xp toolchain with v120 etc.? Can we have a look at your opencpn.log?
As you can see from the asserts you posted, they are pretty much useless, try to trace through the program, starting probably at https://github.com/OpenCPN/OpenCPN/b...nager.cpp#L240, to find the real cause of your problem. The stack trace of the crash you talk about should also be of great utility.

Pavel
nohal is offline   Reply With Quote
Old 06-08-2015, 17:35   #15
Registered User

Join Date: Aug 2015
Posts: 17
Re: OpenCPN Development

Pavel,

I have built 4.1.718 from scratch again according to the build instructions - to the letter (honest). I don't see how I could have mixed debug versions. Again I ran the new installer and loading the PI manager causes a load of errors and ultimately a crash. I have attached a shot of the log file. I nearly think it's time to give up, I'm nearly week at it now and feel like I've got nowhere. It's a pity as I was really looking forward to getting stuck in mixing my two favorite pastimes.

Thanks for all your help.

David
Attached Thumbnails
Click image for larger version

Name:	2015-08-07_00h29_49.png
Views:	194
Size:	92.8 KB
ID:	106847  
Cags is offline   Reply With Quote
Reply

Tags
enc, men, opencpn

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
OpenCPN PlugIn Development bdbcat OpenCPN 161 04-09-2019 13:50
Contribution to OpenCPN Development registry OpenCPN 37 02-04-2013 01:21
New Marina Development in China GordMay Pacific & South China Sea 4 29-09-2009 05:33
News: interesting development craft - high speed landing craft Amgine Multihull Sailboats 0 03-11-2008 12:30
Turks and Caicos Development Petition Canibul Atlantic & the Caribbean 5 24-04-2008 19:15

Advertise Here


All times are GMT -7. The time now is 11:26.


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.