FreeOrion

Forums for the FreeOrion project
It is currently Wed May 22, 2013 11:05 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Compiling of debug versions fails
PostPosted: Tue Jul 17, 2012 8:59 pm 
Offline
Space Krill

Joined: Tue Jul 17, 2012 8:45 pm
Posts: 3
Hello,

I currently have a problem with compiling a debug version of the current SVN-revision.

The "normal" release version with the MSVC2012 project files is no problem (I use the process described in the wiki).

I do the following steps:

- extract the Freeorion SDK
- update directory Freeorion via SVN
- use cmake in advanced mode to adjust boost dir, library dirs, etc.
- try to compile

I currently recompile everything from scratch. If it is finished, I can provide logs, too.

What is the normal approach to build a debug version of FreeOrion?
E.g. what do you normally do?

Thank you very much for your help!! :-)

Best regards,
Yar


Top
 Profile  
 
 Post subject: Re: Compiling of debug versions fails
PostPosted: Tue Jul 17, 2012 9:10 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
I don't make a separate debug build. The MSVC 2010 project files generate debug information for most of the projects (ie. all but the parsers) in release mode, so the MSVC debugger can be attached and breakpoints set, etc.

I also don't use CMake for the Windows build; the MSVC 2010 project files are in SVN already, and are set up to work with the SDK without and adjustments required.

If you really want to make a debug build, I think you'll need to recompile most of the dependencies in debug mode as well; the SDK has only release mode binaries of the dependencies.


Top
 Profile  
 
 Post subject: Re: Compiling of debug versions fails
PostPosted: Tue Jul 17, 2012 9:21 pm 
Offline
Space Krill

Joined: Tue Jul 17, 2012 8:45 pm
Posts: 3
Hi and thank you!

Oh that would be easy then. So you just compile in release mode, start the game and use the "Debug -> attach to process function"?
Is it that easy?

I'll try that now!

Best regards,
Yar


Top
 Profile  
 
 Post subject: Re: Compiling of debug versions fails
PostPosted: Tue Jul 17, 2012 9:27 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
yar wrote:
Oh that would be easy then. So you just compile in release mode, start the game and use the "Debug -> attach to process function"?
That should work. If you also go into the project settings for FreeOrion (the human client) and change the working directory from $(ProjectDir) to $(OutputDir) (or something like that... I don't have it in front of me) then you should be able to launch using the run button at the top of the GUI, which I think will run with the debugger already attached. Without changing the working directory, it will fail to find the rendersystem DLLs.


Top
 Profile  
 
 Post subject: Re: Compiling of debug versions fails
PostPosted: Tue Jul 17, 2012 10:16 pm 
Offline
Space Krill

Joined: Tue Jul 17, 2012 8:45 pm
Posts: 3
Hi,

it worked perfectly that way! :-)

Many thanks!

Best regards,
Yar


Top
 Profile  
 
 Post subject: Re: Compiling of debug versions fails
PostPosted: Tue Jul 17, 2012 10:26 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
I works, though I wouldn't say perfectly. You may run into various cases where local variables are read and displayed properly in the debugger. It's inconsistent and annoying. It sometimes helps to add Logger().debugStream() lines to force there to be actual readable variables there, or to step into a function that uses the variable, which tends to reset the stack or somesuch to make them visible again. It's sometimes more useful to just add those logger lines and not bother with the debugger... Trial and error, etc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group