Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 26-08-2012, 07:49   #61
Registered User
 
rgleason's Avatar

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

Pavel,

Have set OPCN as a "Startup Project" several times. Did it again. I Hit F5 or pick Debug

Popup with 'These projects are out of date:
ZERO_CHECK - Debug Win32
i18n - Debug Win32
grib-i18n - Debug Win32
dashboard-i18n - Debug Win32
ALL_BUILD - Debug Win32
Would you like to build them?
Yes No Cancel
checkbox Don't show this dialogue again.

I guess that that does not matter and hit "NO"

"Unable to start the program
"c:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\Debug\ALL-BUILD"
"The system cannot find the file specified."

Have tried File - Save in the past and this prompt still appears. It did not make sense to save a picture of this active prompt, but here is MSVC++2010 just after I closed the prompt.

http://tgp-architects/OpenCPN/MSVC2010-Debug.png

Am I still having PATH problems?
__________________

__________________
rgleason is online now   Reply With Quote
Old 26-08-2012, 08:08   #62
Registered User

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

OK, so you did not follow the instructions In the solution explorer on the left, right click the opencpn project (not the solution on the top, but the project down in the list) and in the context menu select Set as StartUp Project. Then hit F5.
And watch that video Jesper posted
__________________

__________________
nohal is offline   Reply With Quote
Old 26-08-2012, 08:51   #63
Registered User
 
rgleason's Avatar

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

Yes, that is correct. -Ok, sorry, clearly I am a newbie. Have now scrolled down, to "OpenCPN" set it to a 'startup project' under Projects command. Then right clicked on 'opencpn' in the left panel (Solution Explorer) and picked Debug

A popup came up "Failed to initialize the user interface" go see
" C:\ProgramData\opencpn\opencpn.log"

Quote:
11:47:15: 2012-08-26
11:47:15: -------Starting opencpn-------
11:47:15: Version 3.1.814 Build 2012-08-14
11:47:15: wxWidgets version: wxWidgets 2.8.12
11:47:15: MemoryStatus: mem_total: 8106 mb, mem_initial: 13 mb
11:47:15: SData_Locn is C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\
11:47:15: Using existing Config_File: C:\ProgramData\opencpn\opencpn.ini
11:47:15: No styles found at: C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\uidata\
11:47:15: No styles found at: C:\ProgramData\opencpn\
11:47:15: No styles found at: C:\ProgramData\opencpn\.opencpn\
11:47:15: The requested style was not found:
It seems to have checked for styles everywhere.
__________________
rgleason is online now   Reply With Quote
Old 26-08-2012, 08:56   #64
Registered User

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

Better
Create C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\uidata\ and copy the following files from C:\Data-Dart\Up-Soft\Navigation\opencpn-git\src\bitmaps into it
Code:
styles.xml
toolicons_traditional.png
toolicons_journeyman.png
toolicons_journeyman_flat.png
__________________
nohal is offline   Reply With Quote
Old 26-08-2012, 09:00   #65
Registered User
 
rgleason's Avatar

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

Here is the output

Quote:
'opencpn.exe': Loaded 'C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\Debug\opencpn.exe', Symbols loaded.
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\wxbase28ud_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\wxmsw28ud_core_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6 975e2bd6f2b2\comctl32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6 595b64144ccf1df_1.1.7601.17825_none_72d273598668a0 6b\GdiPlus.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\wxWidgets-2.8.12\lib\vc_dll\wxbase28ud_net_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\wxbase28ud_xml_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\wxWidgets-2.8.12\lib\vc_dll\wxmsw28ud_html_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\wxmsw28ud_adv_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\wxWidgets-2.8.12\lib\vc_dll\wxmsw28ud_aui_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\wxWidgets-2.8.12\lib\vc_dll\wxmsw28ud_gl_vc_custom.dll', Symbols loaded.
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\detoured.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\Nvd3d9wrap.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\nvdxgiwrap.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'opencpn.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Cannot find or open the PDB file
Detected memory leaks!
Dumping objects ->
{3580} normal block at 0x032ACEA0, 24 bytes long.
Data: <P > 50 CD D2 00 FF FF FF FF 00 00 00 00 00 00 00 00
{3579} normal block at 0x032AF4A8, 116 bytes long.
Data: < ) 3 F a > 01 00 00 00 29 00 00 00 33 00 00 00 46 00 61 00
{3578} normal block at 0x032AF2D8, 404 bytes long.
Data: < F a > 02 00 00 00 B4 00 00 00 C3 00 00 00 46 00 61 00
..\src\chart1.cpp(1140) : {3528} normal block at 0x032AD140, 24 bytes long.
Data: < > 00 CD CD CD 00 00 00 00 00 00 00 00 00 00 00 00
{3515} normal block at 0x032ACF80, 52 bytes long.
Data: < o p > 01 00 00 00 07 00 00 00 13 00 00 00 6F 00 70 00
{3514} normal block at 0x032A65B0, 64 bytes long.
Data: <l * * > 6C D0 2A 03 8C CF 2A 03 CD CD CD CD CD CD CD CD
{3513} normal block at 0x032AD060, 52 bytes long.
Data: < P r > 01 00 00 00 0B 00 00 00 13 00 00 00 50 00 72 00

Cut out lots off stufff here -- TOO Long

{1802} normal block at 0x03291798, 8 bytes long.
Data: < ) > E0 17 29 03 00 00 00 00
{1801} normal block at 0x03291718, 64 bytes long.
Data: <4 ) > 34 16 29 03 CD CD CD CD CD CD CD CD CD CD CD CD
{1798} normal block at 0x03291628, 180 bytes long.
Data: < C S C : > 01 00 00 00 43 00 00 00 53 00 00 00 43 00 3A 00
{1483} normal block at 0x03288EF0, 116 bytes long.
Data: < ' 3 > 01 00 00 00 27 00 00 00 33 00 00 00 0A 00 20 00
Object dump complete.
The program '[8872] opencpn.exe: Native' has exited with code 1 (0x1).
__________________
rgleason is online now   Reply With Quote
Old 26-08-2012, 09:14   #66
Registered User
 
rgleason's Avatar

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

Boy are you patient with me!
Created:
C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\uidata
Copied from:C:\Data-Dart\Up-Soft\Navigation\opencpn-git\src\bitmaps
The four files.

Hit F5 said no to popup prompt to rebuild those few older ones.
Then "Welcome to OpenCPN 3.1.814" !!!
Accept.... then pretty soon after some computer thinking up comes OpenCPN!

Harrah!!! Now I can test and send a debug file picture.... There will be some learning about that, but I now am a little more confident I can get there!

I must say, you all have been wonderful helping me to get to this point. Things have changed since I wrote in pascal 15, no more like 20 years ago. We did not have git because there was not a fast internet to download new files. We had one compiler and compiling was much simpler without so many different programs and overlays. We had to write everything, there were fewer tools to draw from, but then it was much much simpler!!! How you all keep track is beyond me!!

Thanks so much!
Rick
__________________
rgleason is online now   Reply With Quote
Old 26-08-2012, 09:17   #67
Registered User

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

Congratulations! You have found your first memory leak in OpenCPN

Now the easiest scenario that comes when you find a bug making OpenCPN crash:
Run the debug build
Make it crash
Examine the output (call stack etc.)
Send it to the devs with as much information as you can provide

Everything else is more complicated, so for now enjoy your moment of glory and digest what you learned...

Pavel
__________________
nohal is offline   Reply With Quote
Old 26-08-2012, 09:25   #68
Registered User
 
rgleason's Avatar

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

Thanks Pavel,
I am sure there are other trials to come, but you made my day!
Will try to digest this and summarize it for others.
Should I run and test without plugins or with plugins?
Which is best to isolate problems, or does it matter.

Rick
__________________
rgleason is online now   Reply With Quote
Old 26-08-2012, 09:28   #69
Registered User

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

Rick...
You will actually always run the debug build without plugins. To debug plugins a little magic in the source code or manual copying is needed. Let's leave it for later.

Pavel
__________________
nohal is offline   Reply With Quote
Old 27-08-2012, 05:18   #70
Registered User
 
rgleason's Avatar

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

Ok, now to OpenCPN with debugging on.
__________________
rgleason is online now   Reply With Quote
Old 27-08-2012, 08:32   #71
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 304
Re: Development Debugging Environment - Setup Help

Quote:
----
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

----
I can't help asking. Did you make it in an hour.

I tried to do this myself about two years ago, but gave up after a few hours... Good work all of you.
Is there maybe something you can add to the instructions after your newbie success?
Maybe summarize the suggested paths and similar to save some time for followers?
__________________
jonasaberg is offline   Reply With Quote
Old 27-08-2012, 08:49   #72
Registered User
 
rgleason's Avatar

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

Dear Jonas, I have been editing a document to summarize this process. I believe the install process could be done in one hour, with a good internet connection for downloading, with the caveat that you know what you are doing (done it before perhaps!) and you follow everything precisely, which I did not do!

Also sometimes it is hard to completely describe what actions to take with software. I was blessed with some very patient people who were willing to help (Pavel, Dave, JesperWe and Thomas with his initial encouragement). I'll try to get the summary up soon and hope that others will review and try it. -

Incidentally, I do think the Developer's website compiling windows is a pretty good structure, and with just a little more description and detail needed for the newbie like me, would be better, so perhaps the summary should follow that, but provide augmentation?
__________________
rgleason is online now   Reply With Quote
Old 27-08-2012, 09:12   #73
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 304
Re: Development Debugging Environment - Setup Help

I think that sounds excellent. Don't reinvent the wheel, just add the small things a beginner would need in the wiki.

I think it would be best if you added your "newbie" comments. The extra info will not hurt the gurus, and help all others.

Let me know when you have finished and I might give it a go!
/J
__________________
jonasaberg is offline   Reply With Quote
Old 28-08-2012, 10:11   #74
Registered User
 
rgleason's Avatar

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

Preliminary Summary. Please Review. Will attach a Word document too.

Compiling Windows for Debug Environment -Supplement
Setting up a "Debug Environment' under Windows for Newbies.
Dated August 28, 2012 Preliminary Summary

This is a simpler subset of setting up a 'Development Environment' which does require all of the actions listed in
"Compiling Windows" intended to assist Newbies who wish to help debug the current development version of OpenCPN.

First Steps
1. Update Windows, if using Windows XP, SP3 is required.
2. Create a Restore point for your computer.
3. Read "Important Notes" under "
Compiling Windows" and the notes for installing each program.
4, It is advisable to shut-down and reboot after installing every two programs in the list. (The first time I installed these programs I was forced to "restore" because windows would not start properly.)

Installing the Programs

1. VC++2010 Express VC++ 2010 Express with Service Pack 1
SP1 installed required three "Windows update checks") & registered the program.
2. VC++ 2008 Express Edition
Skipped, don't install.
3. Git for Windows
Installed Git-1.7.11-preview20120710.exe , (Aug 2012). "Defaults for all the installation settings are fine except the following:
On the „Adjusting your PATH environment“, select „Run Git from the Windows Command Prompt“
On the „Choosing CR/LF behavior“ select „Commit line endings as they are“
Don't worry about creating your own personal repository because we are not going to be making changes to code and are only going to use a Git command to download the current versions of Opencpn from the Opencpn git repository. Y

You can read the link to the tutorial, but much of it does not apply, Git For Windows Developers You do not need to create a local repository and create the SSH Keys as described, since we are just going to be "Getting OpenCpn Code" to setup a Debug environment and not contributing code.

Right click on C drive and now have "Git init" "Git Bash" and "Git Gui" Choices. [Git Gui wants me to create or edit a repository or clone one. -beyond this exercise]
4. Shut-down and Reboot

5. Cmake - Windows (Win32 Installer) cmake-2.8.9-win32-x86.exe Latest Windows version (Aug 2012)
Cmake is a compiler which will be used to compile source code.
During Installation, let the setup program add cmake to the system PATH variable and then later check to find the path variable to "cmake 2.8/bin" (I'll cover this below.)
5. Gettext Poedit: Download The current (Aug 2012) Windows executible is poedit-1.5.2-setup.exe
Poedit is cross-platform gettext catalogs (.po files) editor. It is built with wxWidgets toolkit. The building of Opencpn from source code requires this program.

My Windows 7 (x64) Sixty-four bit system installed Poedit to the directory "C:\Program Files (x86)\Poedit" and I had made a path to "C:\Program Files\Poedit\bin", causing compile problems. So check where Poedit is installed before setting the PATH variable.

Add gettext to your PATH - if you installed Poedit, right-click My Computer, select Properties... and on the Advanced tab click on Environment Variables button and add "C:\Program Files\Poedit\bin" OR "C:\Program Files (x86)\Poedit\bin" to the PATH system variable. Be sure to put a semi-colon ( between variables, they are hard to see! Doing this properly is important because things don't compile correctly if done improperly!
6. Shut down and reboot

7. NSIS (Unicode) - skipped. We do not need to build the install package for Opencpn.

8. Prerequisite -WxWidgets - Downloads - wxWidgets Download wxMSW-2.8.12-Setup.exe and install it
Under "Current Stable Release: wxWidgets 2.8.12 Downloads" - "Source Archives"
Pick "wxMSW - installer for sources (not binaries) Windows, with manual (other formats: zip)" - wxMXW-2.8.12-Setup.exe will pop up.
After installation, refer to Compiling Windows under wXWidgets, making changes to "include\wx\msw\setup.h" and add the two "#define" noted. For me wxWidgets installed in the root directory. edit C:\wxWidgets-2.8.12\include\wx\msw\setup.h and insert
"#define wxUSE_GRAPHICS_CONTEXT 1"
" #define wxUSE_GLCANVAS 1"
-after the line: #define _WX_SETUP_H_
Edit and Check the Path Environment -add "c:\wxwidgets-2.8.12\lib\vc_dll" to the PATH environment variable
9. Check Environment Variables - Now is a good time to do this.
First check all the paths to the above programs. On my Win7x64 computer programs installed to the paths listed below:
Locations of programs:
MS VS10 C:\Program Files (x86)\Microsoft Visual Studio 10.0
Git C:\Program Files (x86)\Git
CMake 2.8 C:\Program Files (x86)\CMake 2.8
GetText PoEdit C:\Program Files (x86)\Poedit
wxWidgets C:\wxWidgets-2.8.12
OCPN Git C:\ <your data directory>\<Navigation -optional>\opencpn-git (Make this directory yoursell)
OCpn Source C:\ <your data directory>\<Navigation -optional>\opencpn-git\opencpn (Created by Git for Source Files)
OCpn Build C:\<your data directory>\<Navigation-optional>\opencpn-git\build (Make this directory yourself)
NOTE: The OCPN Source and Build should not be under Program Files OR Program Files (x86)
Next Right-click My Computer, select Properties... and on the Advanced tab click on Environment Variables button
"Under user variables for" highlight "Path" select "Edit" and check or add something like the following to the values list:
..C:\Program Files (x86)\Poedit\bin;C:\Program Files (x86)\Git\bin;C:\wxWidgets-2.8.12\lib\vc_dll
These path names must correspond to the program installation paths! Click OK to close the PATH Variable.
Then add several new Variables for:
Variable:"Git" Value: " C:\Program Files (x86)\Git\bin" -Note the (x86) option
Variable: "Poedit" Value: "C:\Program Files (x86)\Poedit\bin" -Note the (x86) option
Variable "WXWIN" Value: "C:\wxWidgets-2.8.12"
Okay this housekeeping and set of pointers to critical programs should be checked and you are then ready.
10. Compile wxWidgets alternative 1: From command line (recommended and faster)
A. Use "Start" - "All Programs"- "Visual Studio 2010 Command Prompt" and navigate to
cd C:\${WXDIR}\build\msw
OR for my setup cd C:\wxWidgets-2.8.12\build\msw
B. Then compile using the makefile with the following command :
nmake -f makefile.vc BUILD=release MONOLITHIC=0 SHARED=1 UNICODE=1 USE_GDIPLUS=1 USE_OPENGL=1
Visual Studio Command Prompt (2010) will show "Creating library...." a number of times. No error comments at the end.
...link /DLL /NOLOGO /OUT;..\..\lib\vc_dll\wxbase28u_vc_custom.dll \pdb: "..\..\lib\vc_dll\wxbase28u_vc_custiom.pdb"
LIBPATH..\..\lib\vc_dlll @c:\Users\Rick\AppData\LOcal\Temp\nmD3B5,tmp
Creating library ..\..\libvc_dl\wxbase28u.lib and object ..\..\lib\vc_dllwxbase28u.exp ....And so on...
B. If you want to fully debug OpenCPN, build the wxWidgets debug dlls also.
nmake -f makefile.vc BUILD=debug MONOLITHIC=0 SHARED=1 UNICODE=1 USE_GDIPLUS=1 USE_OPENGL=1
Visual Studio Command Prompt (2010) will show "link...."
C. After executing both nmake commands above several times, there would be no messages with just a new blank line once the command had completed execution. I believe wxWidgets has compiled. The newly compiled files should be in C:\wxWidgets-2.8.12\lib\vc_dll

D.wxWidgets alternative 2, - skipped

E, Convert solution to VC++ format, - skipped

F. Convert solution to VC++2008 format - skipped

G-Reboot computer.
11. Getting the OpenCPN source code (downloading current opencpn source from a repository using git)
A. Start Visual Studio Command Prompt (2010) - from "Start" "All Programs" and from within the command prompt issue:
cd \
cd C:\<Your Data Directory>
git clone git://github.com/OpenCPN/OpenCPN.git opencpn-git

Prompts:
"Cloning into 'OpenCPN' ...remote counting objects...remote compressing objects 100% done....receiving objects 100%...Resolving deltas 100%, done."
C. Now check C:/<Your data directory>/ directory, there should now be a new "opencpn-git" directory which has all the source code downloaded from the remote repository.

D. Note: I found that issuing the git clone command from the VS10 command prompt was a slow download but it worked.
12. Building the OpenCPN source
A. From within or Start Visual Studio Command Prompt (2010)
cd \
cd cd C:\<Your Data Directory>\opencpn-git
mkdir build
cd build
cmake -G "Visual Studio 10" ..
B. Note that errors in compiling are found in CMakeCache.txt from C:\<Your Data Directory>\opencpn-git\opencpn (directory for Source files downloaded with git clone command)

C. If it goes well: from within Visual Studio Command Prompt (2010)
cd C:\<Your Data Directory>\opencpn-git\build
cmake --build
13. Compiling Alternative 1 From Visual Studio Open the solution created by cmake (build/OpenCPN.sln)

Compile the whole solution or individual projects. You have to compile project opencpn before you can compile any plugins (to be fixed in the configuration process)Final Build of the OpenCPN Debug version.
A. To be able to run the debug build,
Create C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\uidata\ and
copy the following files from C:\Data-Dart\Up-Soft\Navigation\opencpn-git\src\bitmaps into it
styles.xml,
toolicons_traditional.png,
toolicons_journeyman.png,
toolicons_journeyman_flat.png
B. We did the following, so you can ignore it. (PATH = C:\wxWidgets-2.8.12\lib\vc_dll ) If you didn't add the WX DLL path to the PATH environment variable earlier, copy the needed WX DLLs to the build directory (Debug or Release, depending on which version you build). The DLLs can be found in C:\${WXDIR}\lib\vc_dll and you will need:
Debug:
wxbase28ud_net_vc_custom.dll, wxbase28ud_vc_custom.dll, wxbase28ud_xml_vc_custom.dll, wxmsw28ud_adv_vc_custom.dll, wxmsw28ud_core_vc_custom.dll - DONE because the goal is to debug!

Release:
wxbase28u_net_vc_custom.dll, wxbase28u_vc_custom.dll, wxbase28u_xml_vc_custom.dll, wxmsw28u_adv_vc_custom.dll, wxmsw28u_core_vc_custom.dll
C. Start- MS Visual Studio 2010 - Visual C++ Express 2010 (not the command prompt version, select the program). Also there is a decent Introduction to using VS2010 at youtube.com /watch?v=z5gBIizwsY0 - 3 part video to get you started. -Just get the idea first then go back to it.

D. No projects are shown, so go to "File" - "Open" - "Project/Solution"

E. Then browse to "C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build" and open the file "OpenCPN.sln" The computer starts processing and "Solution Explorer" Window on the left fills up. Now the left pane Solution Explorer has "Solution 'OpenCPN' (21 projects)" at the top with ALL_BUILD below that. You can highlight each of those, right click and select "Build".

F. Then, if you want to debug OpenCPN, using the "Solution Explorer" window, scroll down to the middle and select "opencpn" and highlight it. Right click and set it as a "start-up project" or Pick "Project" - "Set as Startup Project". The right click "opencpn" again and pick "Build".
Once that is complete, right click again and pick "Debug" - "Start new Instance" OR with "opencpn" highlighted, pick from menu "Debug - Build Solution"
Program starts building
Prompt for the projects that are out of date... would you like to recompile old projects? select yes or no
Prompt for Com Port 3 if no GPS connected.
Then you should have a new Window for typical OpenCPN 3.1.__ with the graphic interface.

G. Now when you want to run OpenCPN, start MS Visual Studio 2010 - Visual C++ Express 2010 make sure the file opencpn.sln is loaded and hit F5.

H. As Pavel says,
Now the easiest scenario that comes when you find a bug making OpenCPN crash:
Run the debug build
Make it crash
Examine the output (call stack etc.)
Send it to the devs with as much information as you can provide






__________________
rgleason is online now   Reply With Quote
Old 28-08-2012, 11:47   #75
Marine Service Provider
 
bdbcat's Avatar

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

Rick...

Great job. I hope we get lots of O Beta testers to follow this procedure and bring us some great crash images!

Want to see a crash, just so you will recognize it?

edit the file chcanv.cpp.

Right around line 3777, make the following change:

Code:
    case WXK_F3: {
        parent_frame->ToggleENCText();
        int a = *(int*)0;
        break;
    }
Note the attempted read access at address 0 (zero).

Run O in debug mode from inside Vs2010. Push F3

" No, no, no. Not allowed. I'll crash now."

There, that was easy

Have fun!
Dave
__________________

__________________
bdbcat is online now   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 09:55.


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.