Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 21-08-2012, 08:48   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Development Debugging Environment - Setup Help

Re: OpenCPN Beta Version 3.1.814 Released
Double clicking a mark that belongs to a layer creates a crash.

Size: 62.8 KB ID: 45164" style="margin: 2px" />

Thomas
-----
Re: OpenCPN Beta Version 3.1.814 Released
Quote:
Thomas Cagney wrote -Double clicking a mark that belongs to a layer creates a crash.
Are you running this in Linux? Or is there a way to setup OpenCPN in windows such that it shows this screen? I might be able to start learning by stepping through the code, ...kind of viewing over the shoulder
Rick

----
You need a dev environment to do this. It's not that hard actually.
I just went through the instructions at Compiling - Windows | Official OpenCPN Homepage and made sure that they're up to date. Follow them and skip the optional steps, should be about 1 hr work to have everything set up.

Thomas

----

Thomas is running ddd on linux, but on Windows you get the same results if you run the debug build in Visual Studio - instructions for building at Compiling - Windows | Official OpenCPN Homepage

Pavel

----

And, rgleason, since you named yourself unfamiliar with these tools in other threads, there is a pretty decent beginners intro to using VS2010 at youtube.com /watch?v=z5gBIizwsY0

Apologies if you find that too basic ;-) ...

JesperWe
__________________

__________________
rgleason is offline   Reply With Quote
Old 21-08-2012, 09:09   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Here's a summary of what I've done so far:

1. VC++ 2010 Express with Service Pack 1 -installed (required three "Windows update checks")
& registered
2. VC++ 2008 Express Edition - skipped
3. Git for Windows - Installed, also made the two changes noted.
4. Cmake -allowed path to be created, found path variable to "cmake 2.8/bin"
5. Gettext -added getext to Path (During installation I canceled what I thought was an addon Download Program. I've just done a search and Poedit does not seem to be installed. I guess I must follow through with this install. Is it required to compile WxWidgets which seemed to compile OK? )
6. NSIS (Unicode) - skipped
7. Prequisites
A. WxWidgets - wsMSW-2.8.12-Setup.exe - installed, added two #define noted, followed Alt #1 & both nmake commands
- I think they both completed.
-skipped wxWidgets alternative 2,
-skipped convert solution to VC++ format,
-skipped convert solution to VC++2008 format
-Rebooted computer.
8. Having Trouble doing this, I don't understand what "project core" is or how I "add GDIPlus.lib" into "Configuration Properties"
In the properties of project core, add GDIPlus.lib into Configuration Properties -> Linker -> Input -> Additional Dependencies for both DLL Unicode Debug and DLL Unicode Release configurations
9. Compile Debug - where is "configurations list" - wondering if I am over my head!
10. Compile Release - where is "DLL Unicode Release"
11. Making your life with wxWidgets easier - added the correct path to Path env
12. Getting the OpenCPN source - haven't done this yet.
13. Building the OpenCPN source - haven't done this yet.
__________________

__________________
rgleason is offline   Reply With Quote
Old 21-08-2012, 09:32   #3
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,945
Re: Development Debugging Environment - Setup Help

Nice progress
Quote:
Originally Posted by rgleason View Post
5. Gettext -added getext to Path (During installation I canceled what I thought was an addon Download Program. I've just done a search and Poedit does not seem to be installed. I guess I must follow through with this install. Is it required to compile WxWidgets which seemed to compile OK? )
Not needed for WX, but needed later when you compile OpenCPN for the internationalization support.
Quote:
8. Having Trouble doing this, I don't understand what "project core" is or how I "add GDIPlus.lib" into "Configuration Properties"
In the properties of project core, add GDIPlus.lib into Configuration Properties -> Linker -> Input -> Additional Dependencies for both DLL Unicode Debug and DLL Unicode Release configurations
9. Compile Debug - where is "configurations list" - wondering if I am over my head!
10. Compile Release - where is "DLL Unicode Release"
Don't worry about this - you did the same from the command line. These steps are used when you build WX using the VisualStudio IDE
Quote:
12. Getting the OpenCPN source - haven't done this yet.
13. Building the OpenCPN source - haven't done this yet.
Now the adventure begins Let us know if there are some problems.

Pavel
__________________
nohal is offline   Reply With Quote
Old 21-08-2012, 09:58   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Thank you Pavel. Very helpful.

I've managed to install #5 Gettext "Poedit". It was actually very simple and easy, "Poedit-1.5.2-setup.exe". Then corrected the Path env variable because it went into Program Files (x86). So PoEdit runs now.

Got it. Steps 8,9&10 above are for building Wx with VS IDE. Using wxWidgets Alternative #1 with two nmake commands takes care of it.

So now I must download OpenCPN Source code using Git and then build it. We'll see how it goes.

Thanks very much.
__________________
rgleason is offline   Reply With Quote
Old 21-08-2012, 18:05   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

I've been reading Git for Windows Developers Part 1
Git For Windows Developers

Do I need to create a local repository and create the SSH Keys as described?
- Comment, It seems we can use Unix commands in Git while running on Windows. This is new to me.

Since I am just going to be "Getting OpenCpn Code" to begin with, perhaps a local repository and SSH is not needed now?

Right click on C drive and now have "Git init" "Git Bash" and "Git Gui" Git Gui wants me to create or edit a repository or clone one.
__________________
rgleason is offline   Reply With Quote
Old 21-08-2012, 18:27   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

I did not do the above.
I just tried starting MS VS 10.0 command prompt and putting in "
git clone git://github.com/OpenCPN/OpenCPN.git

as per instructions and it started "cloneing into OpenCPN"
"remote counting objects: 115554, done.
"remote compressing objects: 100%" done
"recieving objects: 100% done
"resolving deltas: 100% done
"error unable to create file buildwin/NSIS_Unicode/CopyNSISUnicodeRegKey.bat (Permission denied)
etc then it gets into wxWidgets unable to create file...

Maybe I need to create a directory?
-Perhaps a repository for Git with the SSH keys
- Or perhaps a simple OpenCPN source code directory
- If I'm using MS VS 10 where is the best place to put the Build directory?
__________________
rgleason is offline   Reply With Quote
Old 21-08-2012, 21:15   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,648
Re: Development Debugging Environment - Setup Help

rick...

Sounds like a permission problem.

Try:

Code:
cd \
md OpenCPN

git clone git://github.com/OpenCPN/OpenCPN.git
Dave
__________________
bdbcat is online now   Reply With Quote
Old 22-08-2012, 05:37   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Thanks Dave,

This morning after shutting down last night, this Win7 computer would not boot through startup. Held power button to shut off. Win 7 then brought up a screen option to check for startup problems and I believe restored a previous backup. I have to check what, if any OpenCpn programs were affected.

I don't know what caused this. I had been loading the Development environment, but it may be unrelated. Hasn't happened before.

Will check and continue. Have long drive tomorrow.
__________________
rgleason is offline   Reply With Quote
Old 22-08-2012, 06:05   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

A quick check of OCPN Development programs loaded yesterday...
VS 10, wxWidgets, cmake, poedit, and git directories all still exist.
...may have been some changes to the Start / Programs due to the restore.
Also when viewing C drive right click no longer brings up Git choices.
__________________
rgleason is offline   Reply With Quote
Old 22-08-2012, 06:22   #10
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,648
Re: Development Debugging Environment - Setup Help

rick...

I normally use linux.

To test your progress, I downloaded and installed the command-line version of git for windows. Opened a VS2010 command window. Ran "git clone..."
Clone downloaded and installed just fine. Next step is cmake and make.

Dave
__________________
bdbcat is online now   Reply With Quote
Old 22-08-2012, 17:50   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Perhaps Linux is easier, my CAD program runs in Windows and there are other energy and structural programs I use.

I seem to have lost the Path definitions for the various programs.

The ENV Path to git.exe was then created "C:\Program Files (x86)\Git\bin". Then from cmd line execute " git clone git://github.com/OpenCPN/OpenCPN.git" -'git' is not recognized as an internal or external command."

Okay maybe I have to reboot. Should I execute this from the directory that I want to place OpenCPN -dev version in? - But first, from the directory "C:\Program Files (x86)\Git\bin" at cmd prompt I type "git" and get a system error "The program can't start because libiconv-2.dll is missing from your computer. Try reinstalling the program to fix this problem." Which is what I'm going to do now.
Installed "git-1.7.11-preview20120710" -Git GUI is on startup now.
Now from cmd type "git" and the help comes up.
Now execute from cmd "git clone git://github.com/OpenCPN/OpenCPN.git"
and it seems to be working receiving objects...etc
"Resolving deltas: 100% (8287/8297), done."

Okay, where did that go to? What directory? -I executed from C:\Users\Rick. Yes, that's where it landed under "C:\Users\Rick" I'm going to move it to a C:\Program Files (x86) directory OpenCPN-Dev to separate from OCPN 3.0.2
__________________
rgleason is offline   Reply With Quote
Old 22-08-2012, 18:30   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Ok cd to C:\Program Files (x86)\OpenCPN-Dev\build (Made build directory earlier)
execute "cmake". It is not recognized. I have to reinstall cmake next.
__________________
rgleason is offline   Reply With Quote
Old 22-08-2012, 19:23   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Downloaded cmake-2.8.9-win32-x86.exe again and executed, making Path in the Env. Now there is a Program group under startup.

cd to C:\Program Files (x86)\OpenCPN-Dev\build

type cmake Yikes there are many many options.
-G <generator-name> and Visual Studio 10 is listed.

at cmd type "cmake -G "Visual Studio 10" -- error source directory does not appear to contain CMakeLists.text

The OpenCPN-Dev directory has the Cmakelist.txt by Dave Register. The Build directory is under that. I could try alternative 2 using the cmake gui.

I put the source into OpenCPN-Source and left OpenCPN-Dev for the build.

Then started thee Cmake Gui.
Entered C:/Program Files (x86)/OpenCPN-Source
C:/Program Files (x86)/OpenCPN-Dev
Hit Configure, selected Visual Studio 10.
Errors
Configuring incomplete, errors occurred! CMake Error: Cannot open file for write: C:/Program Files (x86)/OpenCPN-Dev/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. C:/Program Files (x86)/OpenCPN-Dev/CMakeCache.txt
CMake Error: : System Error: Permission denied
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. C:/Program Files (x86)/OpenCPN-Dev/CMakeCache.txt
CMake Error: : System Error: No such file or directory


I guess OpenCPN-Source cannot be in Program Files (x86)!
Moved to C:\...\Navigation\OpenCPN-Source - still error.
Need to move OpenCPN-Dev to same directory.

Then tried it. It started checking, but had errors.
Check for working C compiler using: Visual Studio 10 Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
*** Build Architecture is i386
*** Staging to build opencpn 3.1.814 ***
Found OpenGL: opengl32
Found OpenGL...
Lib: glu32opengl32
Include:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find wxWidgets (missing: wxWidgets_FOUND)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindwxWidgets.cmake:831 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:148 (FIND_PACKAGE)




Looks Like I have to reinstall wxWidgets now because of the computer clitch. Got to hit the hay, driving 19 hrs tomorrow.
__________________
rgleason is offline   Reply With Quote
Old 22-08-2012, 19:50   #14
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,648
Re: Development Debugging Environment - Setup Help

Rick ...

Progress!

from C:\Program Files (x86)\OpenCPN-Dev\build, you need to type

cmake ..

Dave
__________________
bdbcat is online now   Reply With Quote
Old 22-08-2012, 23:45   #15
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Development Debugging Environment - Setup Help

Small advice: Keeping your build under C:\Program Files (x86) is not really a good idea. Permission problems are likely.

Better to have a c:\OpenCPN-Dev folder with a build and a OpenCPN repository underneath.
__________________

__________________
JesperWe is offline   Reply With Quote
Reply

Tags
environment

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



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 21:11.


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.