Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-04-2012, 14:58   #1
Registered User

Join Date: Apr 2012
Posts: 8
OpenCPN Plug-In Problem!!

Well hello,

actually I shall develope a plug-in for OpenCPN. But I'm not able to compile OpenCPN, because of several failures, which I don't want to mention now. I know, that opencpn.lib is necessary to build plugins. So my simple question is, whether someone can please upload or send me this file, so that I can work.
Would this be possible?
Thank you!

Best regards,
Philipp
__________________

__________________
Trip2k is offline   Reply With Quote
Old 11-04-2012, 15:07   #2
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,766
Re: OpenCPN Plug-In Problem!!

Philipp,

two suggestions:
- can you please be a little more verbose --> explaining what you want to do and what the problem is

- it does not make too much sense to post the same question three times. We are not blind (normally) and more noise will not result in better responses neither.

bcn
__________________

__________________
bcn is offline   Reply With Quote
Old 11-04-2012, 15:20   #3
Registered User

Join Date: Apr 2012
Posts: 8
Re: OpenCPN Plug-In Problem!!

Hello,

well sorry. I'm totally new and the first post resulted in a failure in my computer. The second I posted, before I found out, that I can create my own thread. Sorry for that!

Well my problem:
I downloaded and built wxWidgets and downloaded openCPN and Cmake. I created with Cmake the project files for MS VS2010 and tried to build it --> lots of compiling failures. So I was not able to get "opencpn.lib". With this file I could compile the example projects of the plug-ins. This is what I want to do right now.

Does this help? Or shall I upload one of the failures?
One little note: I've followed the compiling orders on the opencpn website for compiling with MS VS.

Thanks

Regards
PHilipp
__________________
Trip2k is offline   Reply With Quote
Old 11-04-2012, 21:34   #4
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN Plug-In Problem!!

Philipp...

Lets have a look at your OpenCPN windows build problems.

You are smart. You seem to know the process. If the existing documentation does not work for you, we should fix that first.

The implib for opencpn will not do you much good if you cannot build OpenCPN in a debugable environment.

More PlugIns

Dave
__________________
bdbcat is offline   Reply With Quote
Old 11-04-2012, 23:44   #5
Registered User

Join Date: Apr 2012
Posts: 8
Re: OpenCPN Plug-In Problem!!

Hello,

ok thanks. So where are my problems, how have I worked?!
Steps:
Downloaded OpenCPN in this version OpenCPN-OpenCPN-146d279
just unzip and delete all plug-in-files I don't want (now I have only demo_pi_sample). in cmake:
- source code directory: folder where OpenCPN files are(include, source, etc)
- binaries directory: created a folter "built" in the source code directory and choosed this one
- hit configure and choose "Visual studio 10" and "use default native compilers"
- wait....
- works all fine: just hit configure again...nothing red now
--> generate

go to built-directory and start OpenCPn.sln --> now build just projects one by one:
- dummy -- suceeded
- GARMINHOST -- failure: here is one
Error 1 error C2143: syntax error : missing ';' before '*' c:\users\philipp\desktop\opencpn\include\ocpndc.h 118 1 GARMINHOST
failure is at this position in the source code:
#if wxUSE_GRAPHICS_CONTEXT
wxGraphicsContext *pgc;
#endif
unsigned int tex;


- i18n -- suceeded
- NMEA0183 -- failure: here is one ( same as in GARMINHOST )
Error 1 error C2143: syntax error : missing ';' before '*' c:\users\philipp\desktop\opencpn\include\ocpndc.h 118 1 NMEA0183

same failure in opencpn, but there are others, too. for example
1>C:\Users\Philipp\Desktop\OpenCPN\src\ocpn_pixel. cpp(1154): error C2065: 'm_oldBitmap' : undeclared identifier

in

#ifdef ocpnUSE_DIBSECTION
void ocpnMemDC::SelectObject(wxDIB& dib)
{
// select old bitmap out of the device context
if ( m_oldBitmap )
{
::SelectObject(GetHdc(), (HBITMAP) m_oldBitmap);
if ( m_selectedBitmap.Ok() )
{
#ifdef __WXDEBUG__
// m_selectedBitmap.SetSelectedInto(NULL);
#endif

So this is only a part, I cannot write all failures here.
Theres a list with failures in the attachment!

Does anyone knows the problem?

Thanks again!

PHilipp
__________________
Trip2k is offline   Reply With Quote
Old 11-04-2012, 23:48   #6
Registered User

Join Date: Apr 2012
Posts: 8
Re: OpenCPN Plug-In Problem!!

Here's the failure list
Attached Files
File Type: pdf Failure list.pdf (35.1 KB, 30 views)
__________________
Trip2k is offline   Reply With Quote
Old 12-04-2012, 00:51   #7
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN Plug-In Problem!!

Philipp...
We do not support wxWidgets 2.9, please get 2.8 and follow the steps in Compiling - Windows | Official OpenCPN Homepage. You have to change a couple of vars in wx config before compiling, so please take the time to really go through the instructions.
And choose some other plugin than the demo one to study, if I can give you an advice. No need to delete any part of the source tree - you will loose some code you can use as example and guidance and get almost nothing - while building your plugin, the other ones are not touched, so don't worry about slow compiles.

Pavel
__________________
nohal is offline   Reply With Quote
Old 12-04-2012, 01:21   #8
Registered User

Join Date: Apr 2012
Posts: 8
Re: OpenCPN Plug-In Problem!!

Allright. I will test the whole thing with wxWidgets 2.8 this evening. I will write what happens.
Thanks.
__________________
Trip2k is offline   Reply With Quote
Old 12-04-2012, 02:56   #9
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,766
Re: OpenCPN Plug-In Problem!!

Quote:
Originally Posted by Trip2k View Post
Allright. I will test the whole thing with wxWidgets 2.8 this evening. I will write what happens.
Thanks.
And out of curiosity: what kind of plug-in you want to implement?

Hubert
__________________
bcn is offline   Reply With Quote
Old 12-04-2012, 03:01   #10
Registered User

Join Date: Apr 2012
Posts: 8
Re: OpenCPN Plug-In Problem!!

Well yes...it was late at night, think I forgot this. It shall be a python plug-in I suppose. My boss want to program it. I have to set up all, so that he can program what he wants to. I'm only a student and not so familiar with all this C stuff. That's the reason I asked for help.
__________________
Trip2k is offline   Reply With Quote
Old 20-02-2013, 19:13   #11
Registered User

Join Date: Jan 2006
Location: Rhode Island
Boat: Tayana FD-12
Posts: 612
Images: 6
Re: OpenCPN Plug-In Problem!!

I interpreted "Download from wxMSW-2.8.12-Setup.exe from Downloads - wxWidgets and install it"
as installing the latest stable release and also installed 2.9.
So after fixing that things compile fine up to opencpn...

------ Build started: Project: opencpn, Configuration: Debug Win32 ------
ocpn_pixel.cpp
..\src\ocpn_pixel.cpp(367): error C2664: 'ocpnMemDC::SelectObject' : cannot convert parameter 1 from 'wxDIB' to 'wxBitmap &'

Actually I got around that by doing a hard cast, please advise if that is ok, or how to fix it appropriately. Line now looks like
pmdc->SelectObject((wxBitmap &)*m_pDS);


Debug started, parsing charts, I do have entire US east coast 1 folder up form OpenCPN. i got an unhandled exception.See image.

I guess I'll try release version of the widgets. I really don't need to debug that.
Attached Images
File Type: bmp unhandledexception.bmp (275.3 KB, 18 views)
__________________
phorvati is offline   Reply With Quote
Old 20-02-2013, 19:43   #12
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN Plug-In Problem!!

phorvati...
1) Get rid of wx2.9 - it can confuse cmake while looking for the libraries.
2) If you follow exactly (it means really do every single thing that's written there, we know why we have written it and if it's not clearly marked as optional, it's not) what's written in the compiling instructions, OpenCPN should build just fine without any changes anywhere in the code. It's what I do for every single release, so I think you can trust this information.
From your post it's absolutely unclear what are you doing, so please try to be a bit verbose and perhaps give us the output of the the cmake .. configure step and the build log...

Pavel
__________________
nohal is offline   Reply With Quote
Old 20-02-2013, 20:46   #13
Registered User

Join Date: Jan 2006
Location: Rhode Island
Boat: Tayana FD-12
Posts: 612
Images: 6
Re: OpenCPN Plug-In Problem!!

Sorry for being unclear. The unhandled exception came from that cast. Since then I fixed it. I repeated all the steps after adding 2.8 widgets and it works! Thanks.

So my intent is to ditch the Chart Navigator Pro, and the Garmin charts, and use OpenCPN for my main "Under way" and "route planning" navigation tool.
I would like to setup the application to do following:
Once I am under way, keep my main PC monitor for just displaying the charts and my boat and never ever interrupt that.
Any other windows like options window, or any other winOS information would always be displayed on separate monitor.
I've had way too many occasions where Maptech would start some alarm, or some other stuff would pop in windows just as I am coming in a narrow inlet or a busy harbor. Then I would have to leave the helm go down to click "OK" or close the popup and continue. Very annoying. Also when GPS signal is lost on Chart Navigator, it beeps this very very annoying beep(comes from motherboard speaker). Definitely want to be able to tweak stuff like that.

Then it would be nice to add a window for displaying more details like NMEA inputs form AIS and other peripherals like my wind speed, and depth that would come on COM port. And keep in on a separate display.
As I use it more it will be cool to interface different peripherals with it.
__________________

__________________
phorvati is offline   Reply With Quote
Reply

Tags
opencpn

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 09:19.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.