Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-11-2015, 08:26   #1
Registered User

Join Date: Nov 2015
Posts: 22
OpenCPN Plugin Compilation issue

Hi,
I have followed the instructions on the OpenCPN website to compile a release version.
Compiling - Windows | Official OpenCPN Homepage
This automatically parses through the plugin folder as expected.

However, the .dll files that are created are too large and do not work.
For example, the dashboard-pi.dll that comes with the standard install is approximately half a meg.
The dashboard-pi.dll that is created when I compile is about 3.5 megs.
If I copy the dll into the correct folder and run OpenCPN, the plugin is not available, and the log file gives error 127.

Is there something I need to change to have the plugins compiled to the smaller functioning version ?

Any help is much appreciated !
I have a custom plugin for work that I use, but I can't get it to function as the dll is too large.

V/r,
Chandler
__________________

__________________
dachancellor is offline   Reply With Quote
Old 05-11-2015, 10:31   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN Plugin Compilation issue

Chandler...
I suppose you might be trying to use the Debug build of the plugin with Release build of the core application. It can't work as either links against a different set of libraries, you must build your plugins in Release mode as well - the size then should be the same as the plugins bundled with the installation package.

Pavel
__________________

__________________
nohal is online now   Reply With Quote
Old 05-11-2015, 13:15   #3
Registered User

Join Date: Nov 2015
Posts: 22
Re: OpenCPN Plugin Compilation issue

Thanks for the quick response.
The larger file size is the release version.
I've built the debug as well, and it is twice the size.
Debug - ~7.5mb
Release - ~3.5mb
Installer version - ~0.5mb

In version 3.2, I was able to build as guided, and I had the correct smaller file size.

It may have been with an older version of Visual Studio, but I don't see why that would make a difference. I made sure to follow the guide step-by-step in hopes of having no issues, so I made sure to use the recommended file versions, etc.

Any other suggestions, please let me know.

V/r,
Chandler
__________________
dachancellor is offline   Reply With Quote
Old 05-11-2015, 15:06   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN Plugin Compilation issue

Chandler...
What are you actually building? Current Master branch? 4.0 codebase? Against what? wx2.8, wx3? In what are you trying to use it? 4.0.0? Latest beta?

Pavel
__________________
nohal is online now   Reply With Quote
Old 05-11-2015, 15:27   #5
Registered User

Join Date: Nov 2015
Posts: 22
Re: OpenCPN Plugin Compilation issue

Hi Pavel,
4.1.1022 code from Github.
wx 3.0.2

OpenCPN appears to build fine.
It is just the Plugins that are inflated.

I did get an error (couldn't include windows.h) when building wx from the command line.
I was able to build fine by opening the solution though.
I then ran the cmake commands to configure and build, which works.
(0 errors, numerous warnings).

Thanks for your help.

V/r,
Chandler
__________________
dachancellor is offline   Reply With Quote
Old 06-11-2015, 06:33   #6
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN Plugin Compilation issue

Chandler...
My guess would be that you have the static wxWidgets libraries on your system and are linking with them instead of the DLLs.
Check CMakeCache.txt in your build directory, it should contain lines like this:
Code:
WX_adv:FILEPATH=C:/wxWidgets-3.0.2/lib/vc_dll/wxmsw30u_adv.lib
If the path will contain vc_lib instead, you are building against the static version of the libraries which can't work, get rid of them or modify CMakeCache.txt, re-run cmake, and you should probably be fine.

Pavel
__________________
nohal is online now   Reply With Quote
Old 06-11-2015, 06:44   #7
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,029
Re: OpenCPN Plugin Compilation issue

If the command line build of wx did not work you need to find out why. It will work if your compiler is set up correctly.

Building wx from the solution probably resulted in building static and dynamic libraries which then confuses Cmake. Cmake sometimes selects the static libraries over the dynamic ones.

So I would recommend going back and starting from scratch with building wxWidgets 3.0.2. When you get that working as per the developer's instructions then I bet the rest will work a lot better.
__________________
transmitterdan is online now   Reply With Quote
Old 10-11-2015, 09:11   #8
Registered User

Join Date: Nov 2015
Posts: 22
Re: OpenCPN Plugin Compilation issue

Thank you both for the info.
My cmake cache indeed had vc_lib instead of vc_dll.
I had built with the solution due to an issue with the command line build.
I was missing windows.h, which I've been looking into and seems like I had a corrupt install of VS2013, where the Windows SDKs did not get installed.
I get an error about trusted root certificates.
(This is all done on a computer that CANNOT connect to the internet, so I usually have to troubleshoot getting things installed correctly... )

I did build wx 3.0.2 using my VS2010 install, and it worked fine. The plugins produced were the correct size, and the cmake cache pointed to the correct folder.

As you have suggested, I believe once I can get the command line build of wx to work, I'll be fine.

Thanks again !
__________________

__________________
dachancellor is offline   Reply With Quote
Reply

Tags
enc, opencpn, 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
Run problem after compilation zodd OpenCPN 6 09-01-2014 15:27
Compilation error building survey_pi globalkeith OpenCPN 1 20-05-2012 09:01
Video Compilation of Crane and Lift Accidents Sand crab The Sailor's Confessional 1 23-04-2012 14:34
2.6 beta no compilation for ubuntu 10.04 ?? manuprenlair OpenCPN 3 16-12-2011 13:15
Fedora 13 Compilation Failure . . . PorkLoin OpenCPN 9 20-09-2010 23:38



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.