Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-01-2015, 14:28   #256
Registered User

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

Hans...
I'm slowly but surely running out of ideas... Tried with your cache file on my system (just changing the paths to program files as my system is 32bit) and can't reproduce. Can you try to upgrade to cmake 3.1 to eliminate the possibility of 3.02 being buggy?

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Old 07-01-2015, 14:33   #257
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

Pavel ....

Yes, absolutely. I will upgrade cmake. I will be back...... tomorrow.

/Hans
__________________

__________________
hasse_A is offline   Reply With Quote
Old 07-01-2015, 15:11   #258
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,489
Re: Development Debugging Environment - Setup Help

Quote:
Originally Posted by hasse_A View Post
Pavel .....

It's getting quite late over here. I think I will have to get horizontal now.
Have to be up at 06:00. Will be at it tomorrow again.

There are some other peculiar things.
VS2010 wants to rebuild ZERO_CHECK every time I start debugging.....
Post what ever you find out and I'll check tomorrow.

/Hans
In VS2010 if you look at the left "Solution Explorer" and find OpenCPN and right click you will see Debug->Start new instance. If it asks to rebuild anything just say no. The debugger should start and show put you at the main loop of OpenCPN. You can't run the debugger from the toolbar in my experience.

P.S. This assumes you have already built the debug version from the command line using:

cmake --build . --config debug
__________________
transmitterdan is online now   Reply With Quote
Old 07-01-2015, 15:14   #259
Registered User

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

When you right-click on the opencpn project in the solution explorer, select "Set as Startup Project". It will turn bold and since then you are a happy camper.

Pavel
__________________
nohal is offline   Reply With Quote
Old 07-01-2015, 21:22   #260
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

Pavel, transmitterdan ....

Quote:
Originally Posted by nohal View Post
When you right-click on the opencpn project in the solution explorer, select "Set as Startup Project". It will turn bold and since then you are a happy camper.

Pavel
Yeah, I have set the Startup project to opencpn. I just think that the fact that it wants to rebuild ZERO_CHECK is telling us that something is not right.
Have other things to attend to this morning. Will be back later.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 07-01-2015, 23:14   #261
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

Pavel ...

Ok, got an hour to spare.
Uninstalled CMake 3.0.2, installed CMake 3.1.0.
Notice : even though I clicked in Add PATH to all users" I had to add that manually.

Purged all of OpenCPN. (even the stable release downloaded from the site).
git clone git://github.com/OpenCPN/OpenCPN.git
cd OpenCPN
git fetch --all
mkdir build
cd build
cmake -G "Visual Studio 10" ..

All looks ok this far.

When I do

cmake --build . --config debug

I get :
CMake Error : The source directory "C:....../OpenCPN/build/debug"
does not exist.



/Hans
Attached Thumbnails
Click image for larger version

Name:	Configure.jpg
Views:	66
Size:	423.5 KB
ID:	95134  
__________________
hasse_A is offline   Reply With Quote
Old 08-01-2015, 05:16   #262
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

Pavel, transmitterdan ....

I did a new install of the tool chain on another computer, also win7.

Now it looks like I can build the debug buildon this new machine, but same strange problem with the release build.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 08-01-2015, 05:22   #263
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,489
Re: Development Debugging Environment - Setup Help

Hans,

I have a batch file that clones, configs then builds release and debug. It also copies all the data files as necessary. I'm testing it now against current git head. If it works I will post it here for you to try. I have to run the .bat file in the visual studio 2010 command prompt.
__________________
transmitterdan is online now   Reply With Quote
Old 08-01-2015, 05:42   #264
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,489
Re: Development Debugging Environment - Setup Help

Hans,

From an empty folder I run this doit.bat file. It clones from git and then does all the configuration, building and copying of data files. It builds both debug and release then runs the debug version to make sure it all went according to plan.

I just ran this a few minutes ago and it build both debug and release and they both run without error. It has to run in a Visual Studio 2010 command prompt.
Attached Files
File Type: doc doit.bat.doc (1.8 KB, 24 views)
__________________
transmitterdan is online now   Reply With Quote
Old 08-01-2015, 06:13   #265
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,489
Re: Development Debugging Environment - Setup Help

There is something I don't understand and maybe could be improved in the debugging environment. If I build and run O from the command line then I have to put the uidata, tcdata, plugins, etc. in both debug and release folders. This doesn't make sense to me that I have to copy them twice but ok I do it. Further, if I want to build and debug from Visual Studio 2010 I also have to copy these same data folders into the build folder too. So I end up having to copy them 3 times to 3 different folders else O will not run in one case or another. Same thing goes for the plugins as well. I have to copy the plugins to these same folders else O cannot find them in one case or another. The three cases I use are:

Build and run O from command line in release folder
Build and run O from command line in debug folder
Build and run O from VS 10 in debug config
__________________
transmitterdan is online now   Reply With Quote
Old 08-01-2015, 07:29   #266
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

transmitterdan ......

Yes, your batch file seem to work for both debug and release.
At least on the second computer I set up.

Why not let your batch file copy the files and directories ?

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 08-01-2015, 08:06   #267
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

One thing.

In VS2010, if start in Release mode i can see the grib and the dashboard lug ins, but not if start in debug mode.

Am I missing something. I want to be able to debug the plugin I am working on.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 08-01-2015, 08:16   #268
Registered User

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

Quote:
Originally Posted by transmitterdan View Post
There is something I don't understand and maybe could be improved in the debugging environment. If I build and run O from the command line then I have to put the uidata, tcdata, plugins, etc. in both debug and release folders. This doesn't make sense to me that I have to copy them twice but ok I do it.
Further, if I want to build and debug from Visual Studio 2010 I also have to copy these same data folders into the build folder too. So I end up having to copy them 3 times to 3 different folders else O will not run in one case or another. Same thing goes for the plugins as well. I have to copy the plugins to these same folders else O cannot find them in one case or another. The three cases I use are:

Build and run O from command line in release folder
Build and run O from command line in debug folder
Build and run O from VS 10 in debug config
You don't have to copy the data several times. They should go just to the topmost build folder as said in the instructions, at least that's how it works for me. Ideally they should be loaded from the source folder. Care to undertake the task?
If you want to debug plugins, you have two options - copy them or change https://github.com/OpenCPN/OpenCPN/b...nager.cpp#L236 to point to the actual location of the plugin you are debugging, eg.
Code:
m_plugin_location = _T("c:\\me\\opencpn\\build\\plugins\\myplugin_pi\\Debug");
I much prefer this second option, of course.

Pavel
__________________
nohal is offline   Reply With Quote
Old 08-01-2015, 08:20   #269
Registered User

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

Quote:
Originally Posted by hasse_A View Post
One thing.

In VS2010, if start in Release mode i can see the grib and the dashboard lug ins, but not if start in debug mode.

Am I missing something. I want to be able to debug the plugin I am working on.

/Hans
The debug and release plugin libraries are not the same at all - they use different libs (from the VC through wx to whatever else you are linking)
When you run your Release build, it loads the standard plugins, I suppose. When you run your Debug build, loading these DLLs fails.
In short: You can't mix binaries between debug and release.

Pavel
__________________
nohal is offline   Reply With Quote
Old 08-01-2015, 08:52   #270
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 238
Re: Development Debugging Environment - Setup Help

Quote:
Originally Posted by nohal View Post
When you run your Release build, it loads the standard plugins, I suppose. When you run your Debug build, loading these DLLs fails.
In short: You can't mix binaries between debug and release.

Pavel
Sorry, I don't understand this.
Why would it pick the Release build plugins when I run the Debug build from VS2010 ?
Will the build tree be infected in some way if I ever run in Release ?
Would it be safer to never build the Release build ?

When locking at the sizes the debug plugins -ddl's are almost twice as large.
I suppose this is as it should be.

/Hans
__________________

__________________
hasse_A 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 03:43.


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.