- Setup the build environment using TransmitterDan's script for a Windows development setup https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:development_manual
- Follow Complete builds using Visual Studio 2022/2019 Community Edition I've found this to be a very reliable way to create a Development environment which produces the necessary tarballs.
- I locate my local git folders under C:\Users[user]\source and the windows build environment under C:\Users[user]\source\opencpn
- wxWidgets are automatically downloaded and configured by TransmitterDan's script.
- I build the plugin locally (standalone) with a bash script which can be found here bldwin-rdeb.sh in weather_routing_pi I always build plugins using realwithdebinfo and use Visual Studio that way too.
- First I test the plugin in OpenCPN using Imported Plugin to load the tarball and test it in a preliminary way.
- Then I start up MSVisualStudio, select the project opencpn.sln , and Debug mode > Start Debugging and when OpenCPN starts up, then using Option > Plugins > Import Plugin, import the tarball from C:\Users[user]\source[plugin]\build.
- Note that the first time you compile the plugin you will need to copy the
C:\Users\[user]\source\[plugin]\build\relwithdebinfo\[plugin_pi].pdb
file into the proper OpenCPN development folder which is
C:\Users\[user]\source\opencpn\build\RelWithDebInfo\plugins\[plugin]_pi.pdb
or
C:\Users\[user]\source\opencpn\build\plugins\[plugin_pi]\RelWithDebInfo\[plugin]_pi.pdb
- Now you are ready to test and debug the plugin.
Note: The other way to compile a plugin is to copy the entire git plugin folder into
C:\Users\fcgle\source\opencpn\plugins
where the internal plugins are built, and rebuild OpenCPN along with the plugin.
For some more details and discussion see this comment and those following
C:\Users\[user]\source\[plugin]\build\relwithdebinfo\[plugin_pi].pdbfile into the proper OpenCPN development folder which is
C:\Users\[user]\source\opencpn\build\RelWithDebInfo\plugins\[plugin]_pi.pdbor
C:\Users\[user]\source\opencpn\build\plugins\[plugin_pi]\RelWithDebInfo\[plugin]_pi.pdbNote: The other way to compile a plugin is to copy the entire git plugin folder into
C:\Users\fcgle\source\opencpn\pluginswhere the internal plugins are built, and rebuild OpenCPN along with the plugin.
For some more details and discussion see this comment and those following