Mike,
I just tried compile for windows again. Its the same problem, but I don't see the 68 spatialite.obj LNK errors from before, (so I think you got cmake working cleanly). Now I think it is some other library, possibly the one you loaded to make Linuxwork.
--Maybe we need a windows compile conditional statement?
11:15:59 AM: C:\Program Files (x86)\OpenCPN 4.1.1317\plugins\ocpn_draw_pi.dll
API Version detected: 113 PlugIn Version detected: 2
11:15:59 AM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.1.1317\plugins\survey_pi.dll
11:15:59 AM: Error: Failed to load shared library 'C:\Program Files (x86)\OpenCPN 4.1.1317\plugins\survey_pi.dll' (error 126: the specified module could not be found.)
11:15:59 AM: PlugInManager: Cannot load library: C:\Program Files (x86)\OpenCPN 4.1.1317\plugins\survey_pi.dll
11:15:59 AM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.1.1317\plugins\vdr_pi.dll
11:15:59 AM: C:\Program Files (x86)\OpenCPN 4.1.1317\plugins\vdr_pi.dll
API Version detected: 106
PlugIn Version detected: 4
Just tried to add the paths in MSVC under properties, link, input, add depend.
n MSVC2013 I still needed to check that the Link files
under survey_pi > Properties > Linker > Input > Additional Dependencies List
C:\splite-msvc\lib\freexl.lib
C:\splite-msvc\lib\iconv.lib
C:\splite-msvc\lib\proj.lib
C:\splite-msvc\lib\geos_c.lib
were still added to the end. I had to keep putting these files back in as they were missing.
And I got these notes, so I guess you did fix that problem... so it must the the new library you added for Linux should not be seen by Windows cmake compile. Conditional needed I guess.
Quote:
1>------ Build started: Project: survey_pi, Configuration: Release Win32 ------
1> Creating library C:/Users/Rick/Documents/GitHub/o-plugin/mr-survey_pi/build/Release/survey_pi.lib and object C:/Users/Rick/Documents/GitHub/o-plugin/mr-survey_pi/build/Release/survey_pi.exp
1>proj.lib(PJ_aeqd.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_geos.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_eqdc.obj) : warning LNK4217: locally defined symbol _hypot imported in function _pj_eqdc
1>proj.lib(PJ_bonne.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_bipc.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_aea.obj) : warning LNK4217: locally defined symbol _hypot imported in function _setup
1>proj.lib(PJ_lcc.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_laea.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_forward
1>proj.lib(PJ_gnom.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
1>proj.lib(PJ_sterea.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_ortho.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
1>proj.lib(PJ_oea.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_mod_ster.obj) : warning LNK4217: locally defined symbol _hypot imported in function _e_forward
1>proj.lib(PJ_sconics.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
1>proj.lib(PJ_stere.obj) : warning LNK4049: locally defined symbol _hypot imported
1>proj.lib(PJ_nsper.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
1>proj.lib(PJ_tpeqd.obj) : warning LNK4217: locally defined symbol _hypot imported in function _pj_tpeqd
1> survey_pi.vcxproj -> C:\Users\Rick\Documents\GitHub\o-plugin\mr-survey_pi\build\Release\survey_pi.dll
========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
Mike, I just updated the opencpn.lib to the most current v4.1.1317 and copied it into the build directory. To be compatible with Opencpn 4.1.x the plugins have to have a 4.1.x opencpn.lib due to the change to wxWidgets 3.0.2. Also if the plugins are using new libs and external links from opencpn (as I understand it) then the plugin requires the most current opencpn.lib from 4.1.x The example for this is ODraw. I have simply been using the most current opencpn.lib for 4.1.x Beta that is available for all of the plugins.
The one I have been using is the most recent Opencpn v4.1.1317, and now we are on v4.1.1327, so it is unlikely I will be recompiling all of them unless they need it.
I have no idea what you do for linux standalone compiles.. I started to do this in Linux with a virtualbox a long time ago and I think you don't do it in standalone mode, you sudo something and then compile, so shouldn't the opencpn.lib be current?
Quote:
I didn't find a Linux vdr_pi for O 4.1.x. The Pavel ppa is for version 4.0 as far as I can see. Have you seen a 4.1 vdr for Linux?
Mike
Mike, I cleaned build and started over. It compiled build release fine. I installed it and Opencpn did not recogniize it. Same error in the log. Did not show up in the Plugins.
Missing some library. Sooo then I went back and read some notes about how to get this going.
Usage on Windows
Copy the following four(4) DLLs to the OpenCPN program folder:
freexl.dll,
geos_c.dll,
proj.dll,
iconv.dll
They can be found in the "Extras" directory.
Now when I do that, I am over wrtting a previous iconv.dll, so I do it.
Now when I try to start OpenCPN I get two error messages. See below.
(Also I do find the survey.dll in the plugins directory where it should be.)
Opencpn 4.1.1329 does not work after removing those dlls, so I had to reinstall because the original iconv.dll was missing.
We just have to get the problem with iconv.dll and the 4 files sorted out, and hopefully have them included with the main Opencpn installation unless they can be installed by the installer.
...Perhaps it is a matter of just installing
freexl.dll,
geos_c.dll
proj.dll
in the main opencpn directory?
A small success! Just install the three files
freexl.dll,
geos_c.dll
proj.dll
in the main opencpn directory.
Then start OpenCPN and it appears after you enable.
Now how to make the installation better?
First the 3 files need to get copied to the NSIS subfolder.
Then during installation they need to get copied to the main Opencpn directory... this is Cmake and NSIS magic!
Maybe someone can work it out...?
I will put the three files and the Survey Install file up on O Beta File Thingie, in a "Survey_pi" Folder for others to try the plugin if they would like.
Well, I tried to run a Nmea file, and after the O screen went Black and there was a lot of gears running and I thought I'd lost O, the screen came back up and low and behold the plugin had processed the Nmea file.
Now I had a little problem, I had no idea where it is located. I searched and searched and then tried looking in Route manager, but it is not there because it is a separate database. I thought to myself there should be a "Center Extent of Survey" choice in the Plugin to help us figure out where it is.
In practice that might not be needed, but for me itt is.
I've already forgotten how you use this, and it looks a little different to me now. Could you explain a little how it works?
I used "Load from Nmea" which is pretty clear.
What is the "Record Nmea button" for? To simply record the data stream coming to Opencpn?
Then there is Import and Export I assume these are for different file types (csv, xyz -what is that? and gmp -what is this?)
How would you use these tools if you were going to record the bottom into your favorite hurricane hole?
--Since this is using nmea, is it useful for other data types? ..extensions... maybe? just an idea.
Mike:
I have included with this note a shell script that installs the latest OpenCPN & most of the plugins I could find. I should run under any Linux system.
Would you give it a try on your Linux system and let me know how it goes?
It will ask you some questions about installation of various things, just say no to the first two questions, and what ever you would like for the rest.
At the first pass I forgot to say no to the second question and installed a lot of your stuff. Never mind, I got Synaptic Package Manager as a bonus.
At first pass I chose 'Master' and got OpenCPN 4.0.0, which overwrote my own compiled 4.1.1317. No parallel installation possible here. Interesting, the plugins are placed in usr/local/lib/opencpn by your script and usr/lib/opencpn when I make install from standalone.
At the second pass I went for 'devel'. All went well and I tested my plugins.
1. Tidefinder crashed O. More work obviously needed.
2. Survey and VDR worked fine.
3. OTCurrent worked.
4. DR worked.
Some odd effects when working with OpenGL. It may be my system (v 2.1).
Going back to play with Grib2 this afternoon. I will write some notes on survey_pi idc. Loading the NMEA file does take time. Really only intended for a test. That is why I gave an option to only load x soundings. Better to use vdr_pi and 'Record NMEA'.
Downloaded libiconv-1.7 and did make/sudo make install for this.
Also installed libiconv-hook-dev and libiconv-hook1 from the software centre. Not sure if this was critical or not, but it came up when I did a Google search around the libiconv problem.
To test survey_pi on OpenCPN 4.1.1317 I wanted to use VDR_pi. Couldn't find the version for 4.1.x so I compiled my own. My fork it is here:
Not yet re-tested on Windows. Hope nothing has been broken but ...
Let us know how it goes.
Mike
Mike:
Where did you get the libiconv-1.7 from?
I have not been able to locate that particular version.
It is not available from the usual Ubuntu apt-get install command.
Mike:
Where did you get the libiconv-1.7 from?
I have not been able to locate that particular version.
It is not available from the usual Ubuntu apt-get install command.
Mike, I have just been trying to build Survey_pi again, and I had to relearn again some things that I want to make explicit here.
Survey_pi-Instructions.doc
----------------------------------
Some of the readme instructions are inaccurate or older, but they do help me, but probably not others. Except there is one recent line that is just inaccurate which says to copy dll files's when they should be libs. So I have written a newer instruction set to try to help.
This explains how to build it in windows and provides necessary installation details for windows.
Installing into windows.
------------------------------
Quote:
2. Copy from directory survey_pi\Extras\splite-msvc\bin\ these three files:
geos_c.dll, freexl.dll, proj.dll to the main OpenCPN directory.
3. Do not copy the iconv.dll file because that is a newer version and should already be in the directory. Do NOT copy over it otherwise OpenCPN will open with an Error.
The errors you will see are in the attached files
Survey_pi-Startup-Error-fontconfig.png
Survey_pi-Startup-Error-libxml2.png
Screenshots and Use
------------------------------
Once you have installed survey_pi properly, the plugin must be enabled and preferences entered. See screenshot.
Then from the Toolbar the plugin Icon is selected and a dialog pops up (see attached screenshot).
Started a "New: survey "Test" Then "Import" a gmp file from the Extras folder.
Problem
------------------
The problem is that the Dialogue box is "frozen" and cannot be dragged or expanded. How can that be fixed so that we can see the data better?
--
Also the is a list of 17 warnings FYI.
-----
NOTE OF THANKS
-----------------------
A big thank you is due to Mike and Pavel for all their expertise in getting this plugin to this point. It is looking very usable to me. Hopefully this summer I will start using it.