Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 26-07-2016, 02:07   #1
Registered User

Join Date: Jul 2016
Posts: 5
Problems compiling plugin

Dear OpenCPN Community,

I tried to make my own plugin using the demo_pi. I've started with compiling the complete OpenCPN build. That worked and I can start the OpenCPN.

Then I tried to follow the steps in the developer guide fr compiling standalone opencpn plugins. I encountered several errors which I could solve.

Now I have a problem I have no Idea how to solve.

When I start compiling I get serveral of these errors, always including something about the wx... stuff.

Code:
  ***_pi.obj : error LNK2019: unresolved external symbol "__declspec (dllimport) public: bool __thiscall wxAuiPaneInfo::IsOk(void)const " (__imp_?Is Ok@wxAuiPaneInfo@@QBE_NXZ) referenced in function "public: virtual void __thiscall ***_pi::OnContextMenuItemCallback(int)" (?OnContextMenuItemCallb ack@***_pi@@UAEXH@Z) [C:\GitOpenCPN\OpenCPN\plugins\***_p i\build\***_pi.vcxproj]
Can anyone help me with this problem? I am not sure, where I have to look for the error.

Kind regards
Nico
__________________

__________________
n.ei is offline   Reply With Quote
Old 26-07-2016, 05:52   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,082
Re: Problems compiling plugin

Nico, you don't say what OS you are using or give other details. We should not have to remind people that context is important. I am guessing that you are using MSVC++ and Windows OS.

I am also guessing that you are missing opencpn.lib because of the missing external.
__________________

__________________
rgleason is offline   Reply With Quote
Old 26-07-2016, 06:33   #3
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: BVI
Boat: bristol 27
Posts: 2,675
Re: Problems compiling plugin

try a different plugin from demo_pi? Try statusbar_pi maybe?
__________________
boat_alexandra is offline   Reply With Quote
Old 26-07-2016, 07:05   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,945
Re: Problems compiling plugin

Nico...
It seems you are not linking against wxAUI, but without seeing your super secret *** code, it is impossible to say for sure.
Also as Sean suggested, it is probably better to start with some maintained code, not from demo_pi which we don't maintain actively.

Pavel
__________________
nohal is offline   Reply With Quote
Old 26-07-2016, 08:54   #5
Registered User

Join Date: Jul 2016
Posts: 5
Re: Problems compiling plugin

I am sorry, you are absolutely right. I was already wondering why my post is so short

Ok, I'll try again.

I am using Windows, you are right. MSVC++ is also correct. I was using the demo_pi. I copied the folder and adjusted all the names for my purpose. I haven't changed anything of the code except for the errors I encountered. For example there were some errors about the nmea part. I compared this with the nmea source files of the dashboard plugin and was able to solve all of the errors.

opencpn.lib was missing in the debug folder, but since I succeeded in compiling opencpn I had the .lib and also was able to solve the error by copying the opencpn.lib in the right folder.

But anyway I wasn't able to compile neither my own plugin nor the demo plugin. Both had the same errors about the unresolved external symbol with always something about wx*** in the description.

As far as I can tell from the error there is something wrong with the wxwidget lib.

Edit: Ok, thats what I was assuming. Something is wrong with the linking. The "super secret" code isnt anything fancy. I have exactly the same problem with the demo plugin. Ok, I will try another plugin. I thought the demo_pi should work, thats why I was wondering and asking you here now.
I will ask you again if I will have problems with another plugin as basement for my plugin.

Thanks for your help so far.

Nico
__________________
n.ei is offline   Reply With Quote
Old 26-07-2016, 16:12   #6
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: BVI
Boat: bristol 27
Posts: 2,675
Re: Problems compiling plugin

I suspect demo_pi may not compile out of tree.
__________________
boat_alexandra is offline   Reply With Quote
Old 26-07-2016, 18:19   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,082
Re: Problems compiling plugin

n.ei, I think Sean (boat_alexandra) has a good point.

Can you try to build demo_pi while building OpenCPN? Demo_pi was built as a very early example of plugins by Dave, so it is probably not configured for stand alone build.

Perhaps you could try a standalone build of Sean's status_pi ?
https://github.com/seandepagnier/statusbar_pi
__________________
rgleason is offline   Reply With Quote
Old 27-07-2016, 02:49   #8
Registered User

Join Date: Jul 2016
Posts: 5
Re: Problems compiling plugin

Ok, so here s an update on my status now:

I got the statusbar_pi and were able to compile it. I changed it a little bit and its working now. So dont worry about my problem anymore.

Thanks to you all for helping me. If I got any further questions I will open a new topic since compiling was successful now.

I haven't tried building the demo_pi anymore. If you are interested in this problem I can try buidling it while building OpenCPN but I do not want to put too much effort in this.

Again, thank you very much for your qualified and fast help.

Best wishes to you all
Nico
__________________

__________________
n.ei is offline   Reply With Quote
Reply

Tags
plug

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Compiling wushinwei OpenCPN 6 10-05-2015 04:44
Problems Compiling Release Opencpn 4.0.0 cachaciero OpenCPN 2 09-03-2015 01:42
Compiling Plugin for OSX hmacread OpenCPN 4 10-11-2014 05:36
GRIB plugin problems Hambler OpenCPN 3 14-04-2014 03:36
Make - Problems (Compiling) schotenandi OpenCPN 2 10-10-2010 17:57


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 20:46.


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.