Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 01-11-2015, 07:30   #106
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Thanks Mike, I tried it again. The links before did not take because I had ";" at the end. So this time I did:
Quote:
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
And from inside MSVC it compiled! I will try from command prompt next.
rgleason is offline   Reply With Quote
Old 01-11-2015, 07:33   #107
Registered User

Join Date: May 2012
Posts: 1,205
Re: Hydrographic Survey Plugin

Rick ...

Ok, nearly there.

I changed CMakeLists.txt to read C:\splite-msvc\include instead of C:\OSGeo4W\include.

CMake-GUI to help me find the right WxWidgets.

Used VS 2013 and linked in the lib files from C:\splite-msvc\lib.

Builds and runs fine.

No need for OSGeo4 now on my system.

If you can confirm this I will push an edit to GitHub.

Mike
Rasbats is offline   Reply With Quote
Old 01-11-2015, 07:35   #108
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

from
Quote:
C:\..\GitHub\o-plugin\mr-survey_pi\build>cmake -T v120_xp ..
'cmake' is not recognized as an internal or external command, operable program or batch file.
Why is this happening?
Do I have to delete the build/cmake.cache.txt ?
Will that delete the links that were set up?
--I'll give it a try anyway.

PS: Nope its a path problem I guess. Something changed in the paths when I was in MSVS2013
rgleason is offline   Reply With Quote
Old 01-11-2015, 07:41   #109
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

C:\splite-msvc is 23mb only
C:\OSGeo4W as I downloaded it, with geos, iconv, proj & freexl is 73mb, and it does not have two of the necessary lib files.

I think I should remove OSGeo4W directory as it is unused now.
rgleason is offline   Reply With Quote
Old 01-11-2015, 08:40   #110
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Mike,

I had to reboot to get cmake working again. I think that SET Path command used to check if the package is correctly installed over-rode the environment path somehow.

Now cmake is working and I get the 68 Link errors again.
I am finding that adding the links in MSVC are not "sticky".

Once again added to the end:
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

And MSVC Build compiles ok.

Quote:
===========
1>------ Skipped Build: Project: survey-po-update, Configuration: Debug Win32 ------
1>Project not selected to build for this solution configuration
2>------ Skipped Build: Project: survey-pot-update, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
3>------ Build started: Project: survey_pi, Configuration: Debug Win32 ------
3> Creating library C:/Users/Rick/Documents/GitHub/o-plugin/mr-survey_pi/build/Debug/survey_pi.lib and object C:/Users/Rick/Documents/GitHub/o-plugin/mr-survey_pi/build/Debug/survey_pi.exp
3>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
3>proj.lib(PJ_aeqd.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_geos.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_eqdc.obj) : warning LNK4217: locally defined symbol _hypot imported in function _pj_eqdc
3>proj.lib(PJ_bonne.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_bipc.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_aea.obj) : warning LNK4217: locally defined symbol _hypot imported in function _setup
3>proj.lib(PJ_lcc.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_laea.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_forward
3>proj.lib(PJ_gnom.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
3>proj.lib(PJ_sterea.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_ortho.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
3>proj.lib(PJ_oea.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_mod_ster.obj) : warning LNK4217: locally defined symbol _hypot imported in function _e_forward
3>proj.lib(PJ_sconics.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
3>proj.lib(PJ_stere.obj) : warning LNK4049: locally defined symbol _hypot imported
3>proj.lib(PJ_nsper.obj) : warning LNK4217: locally defined symbol _hypot imported in function _s_inverse
3>proj.lib(PJ_tpeqd.obj) : warning LNK4217: locally defined symbol _hypot imported in function _pj_tpeqd
3> survey_pi.vcxproj -> C:\Users\Rick\Documents\GitHub\o-plugin\mr-survey_pi\build\Debug\survey_pi.dll
4>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
4>Project not selected to build for this solution configuration
5>------ Skipped Build: Project: PACKAGE, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration
========== Build: 1 succeeded, 0 failed, 3 up-to-date, 4 skipped ==========
Quote:
Rick ...Ok, nearly there.
I changed CMakeLists.txt to read
C:\splite-msvc\include instead of C:\OSGeo4W\include.
CMake-GUI to help me find the right WxWidgets.
Used VS 2013 and linked in the lib files from C:\splite-msvc\lib.
Builds and runs fine.
No need for OSGeo4 now on my system.
If you can confirm this I will push an edit to GitHub.
Mike
I changed that too and have checked the survey_pi linker list and found that my previous entries are still there. I closed that and hit 'build'

It is now building. I'll let you know other details in a minute.
rgleason is offline   Reply With Quote
Old 01-11-2015, 08:56   #111
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Mike,
After cmakelists.txt Line 18
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src C:/splite-msvc/

changing the path to C:/splite-msvc/

In 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.

NOTE: I don't know if this is related to a popup message whenever I close a Project file, saying that Intellisense is NOT working and I need a Compact MS SQL 4.0 ???

Anyway when I try to compile from the command line I always get the 68 errors.
However I do have a C:\Users\Rick....\GitHub\o-plugin\mr-survey_pi\build\Debug\survey_pi.dll dated Nov 1 11.44 am so it did compile under MSVC, but does not under the command line for me.
rgleason is offline   Reply With Quote
Old 01-11-2015, 09:17   #112
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

I wonder if there is somewhere else in cmakelists.txt or the C:\..\mr-survey_pi\cmake files where we have to enter the external libs that need to be loaded.
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
because I have to always re-enter them from within MSVS after I close MSVS.... or perhaps I need that MS SQL Compact DB 4.0 that keeps popping up???

What happens for you? Do you have an MS SQL database installed? -Do you get a message to install one when you close a project? -Thanks
rgleason is offline   Reply With Quote
Old 01-11-2015, 17:00   #113
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Try again, the 4 dependencies are lost when close MSVC

After insert the four paths and files into survey_pi > properties > linker >Input>Additional Dependencies
Added to the end:
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
Closed window.
Then Build using MSVC2013.Builds successfully.
Also can do cmake --build . --config debug and it builds successfully.
I find the survey.dll under plugins/debug
However cmake --build . --config release shows 68 linker errors.

Its almost there, we need to get someone to tell us how to add external lib files.

rgleason is offline   Reply With Quote
Old 16-11-2015, 08:13   #114
Registered User

Join Date: May 2012
Posts: 1,205
Re: Hydrographic Survey Plugin

The first version was let out too early. Trying again.

https://github.com/Rasbats/survey_pi

The Windows dll was made with O 4.1.925 and VSExpress 2013.
(In the Extras folder: please look at the ReadMe)

Survey_pi has a lot of improvements.

CMake-GUI was used to help find the correct version of WxWidgets.

The problem of linking the external libraries when building the dll remains.

Mike
Rasbats is offline   Reply With Quote
Old 16-11-2015, 17:04   #115
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Mike,
  1. Had used cmake-gui to make sure cmake configured ok.
  2. Git fetched and Git pull origin master.
  3. Then copied freexl.dll, iconv.lib, proj.lib, geos_c.lib from ..\survey_pi\Extras\dll\ to ..\mr-survey_pi\ AND to the ..\survey_pi\buildwin directory.
  4. Copied recent version of opencpn.lib to ..\survey_pi\build
  5. Opened Visual Studio 2013 Express for Desktop.
  6. Open a File > New project and point to ../survey_pi/build/survey_pi.sln
  7. Solution Explorer (right panel) shows a list of items.
  8. Right-Click on the "survey_pi" halfway down the list not the top survey_pi (8 projects). Select "Set to startup project".
  9. Right Click again on "survey_pi" halfway down the list. Select Build. Wait. Many LINK errors
  10. Right Click again on "survey_pi" halfway down the list.
  11. At the bottom of the popup list you will find 'Properties'.
  12. Select 'Properties' and a form 'survey_pi Property Pages' is shown.
  13. Click on 'Linker' and 'Input', and at the top of the list on the right, you will find 'Additional Dependencies'.
  14. Click on the line of files and on the far right you get a drop down arrow. Click this and you get the option <Edit...>.
  15. The files are now shown as a list and you can insert the 4 lib files one by one. Copy and paste can be used in this list. The path to the lib file needs to be included as well as the file name.
  16. To fix the Link errors, add these separate lines to the end: (I shorted the path, use your own path to the files!)
  • C:\..\survey_pi\Extras\splite-msvc\lib\freexl.lib
  • C:\..\survey_pi\Extras\splite-msvc\lib\iconv.lib
  • C:\..\survey_pi\Extras\splite-msvc\lib\proj.lib
  • C:\..\survey_pi\Extras\splite-msvc\lib\geos_c.lib
  1. Then Right Click again on "survey_pi" halfway down the list and Select "Build" again. It builds successfully.
  2. I find a new file "survey_pi.dll 11/16/2015 7:22pm" under the Debug directory! -Good Mike! great job.
So how do I get the 4 files to stick? Because I have to enter them every time I close VS2013.

Also how do I get this to build a "release" version? I can't seem to get VS2013 configured on this project to build "release".


So in summary, I think this process is less cumbersome, but could be inproved if we could do standalone compiles at the Developer Command Prompt, just typing the commands. (Right now we just get 68 Linker errors.)



I think it would relatively easy to get this to compile easily. Maybe Pavel could take a brief look and give us a hint which line in cmake to change?


Thanks Mike. I'll try the release version that you have provided now.
rgleason is offline   Reply With Quote
Old 16-11-2015, 17:15   #116
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Before exiting VS2013 I picked "File > Save As", then closed.
Then opened VS2013 again with survey.sln project and found that the 4 new links I had created were still there. This is fine if you always use VS2013, but it would be better to be able to use the command line.

Also I can't get it to compile a Release version.
rgleason is offline   Reply With Quote
Old 16-11-2015, 17:53   #117
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Okay I copied:
C:\Users\..\GitHub\o-plugin\survey_pi\Extras 4.1.925_survey_pi.dll
To
C:\Program Files (x86)\OpenCPN 4.1.1108\plugins

And I copied:
C:\Users\Rick\Documents\GitHub\o-plugin\mr-survey_pi\Extras\dll (Copy 4 dll)
To
C:\Program Files (x86)\OpenCPN 4.1.1108\

Then loaded OpenCPN4.1.1108 and enabled Survey_pi. (See screenshot)

Then I loaded several of the files from:
C:\Users\..\GitHub\o-plugin\mr-survey_pi\Extras\NMEA

The last one was Tamar.txt which is on the Tamar River in Southeast England above Plymouth. (See Screenshot) Mike did you do this one?

It looks like this plugin is almost ready to use! But first it should be tested more.

(I'd like to be able to rename the name of the file after the fact, for example.)

Looks great Mike! Hope others will join in and map the world via wifi download.
Attached Thumbnails
Click image for larger version

Name:	Survey-Enable.png
Views:	174
Size:	154.1 KB
ID:	113196   Click image for larger version

Name:	Survey-Tamar.png
Views:	170
Size:	83.8 KB
ID:	113197  

Click image for larger version

Name:	Survey-Adriatic.png
Views:	162
Size:	65.1 KB
ID:	113198  
rgleason is offline   Reply With Quote
Old 16-11-2015, 18:12   #118
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

I tried to make an install file by copying your release version into build/release/ then running NSIS with "cpack" command. I had the 4 dlls under "buildwin" I hoped they would get included and be installed under the /opencpn/ directory by the user.

However cmake is not configured to do that for this plugin. It would be a custom line that would do this I believe. However Pavel and Sean worked out more complicated things for weatherfax and Climatology, so it can be done.

Good thing is I do have an executable for just the survey_pi.dll! Will upload tomorrow.
with a zip for the dll's
rgleason is offline   Reply With Quote
Old 17-11-2015, 02:29   #119
Registered User

Join Date: May 2012
Posts: 1,205
Re: Hydrographic Survey Plugin

This plugin is at a very early stage of development. A lot of important issues have not been addressed. The most important are correction for tide and met. Also transducer depth/offset, GPS offset etc etc etc. Intention is to work on these over the next few weeks.

To avoid crowding the chart with soundings it is possible to set the minimum distance between soundings in the Preferences panel of the plugin.

Pavel made an excellent template. A lot of empty spaces still need to be filled.

Mike
Rasbats is offline   Reply With Quote
Old 17-11-2015, 05:06   #120
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,630
Images: 2
Re: Hydrographic Survey Plugin

Thanks Mike for that important information. Perhaps some of you Beta testers will try it out?

We've uploaded several files of Mike's to Opencpn Beta File Thingie rguser rgpass
Got to 4.1.925 Win PI directory

OSGeo4W-DLL.7z has the 4 dll files that get put in the main opencpn directory.
4-1-925-survey_pi.dll put in plugins directory (change the doc)


Also under 4.1.1108 PI Win directory there is an installer file for Opencpn4.1.1108
ocpn_draw_pi-0.4.544-ov4.1.1108-win32
plus OSGeo4W-DLL.7z

There also is a folder Hydrology_pi that has the 4 necessary dll files.

Mike your suggestion that I change the "Debug" menu item in VS2013 to get into "Release" mode is appreciated. Will try it. Sometimes I haven't done something for awhile and forget!
rgleason is offline   Reply With Quote
Reply

Tags
survey


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
Hydrographic Survey Plugin nohal OpenCPN 326 01-12-2023 07:35
OpenCPN Radar Overlay PlugIn bdbcat OpenCPN 900 21-09-2022 00:26
Marine Survey 101 boatpoker Monohull Sailboats 42 15-07-2021 05:51
Low Cost Boat Worth a Survey ? JDRichlen Liveaboard's Forum 52 18-03-2012 10:32

Advertise Here


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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.