Page 1 of 1

Building GMAT in Debug Mode

PostPosted: Thu Jul 12, 2012 4:24 pm
by marchand
If I wanted to compile GMAT in debug model, via VS2010, do wxWidgets and cspice have to be recompiled in Debug mode as well? or can I just compile GMAT in debug mode and have the other two compiled in Release form?

Assuming I don't need to recompile those two, should this work?

(1) Right-click on GMAT_wxGUI in the Solution Explorer and select "Set as startup project"
(2) Selecting "Debug" from the available configurations
(3) Rebuild the project

This creates an application\bin\debug folder, with the debug version of libGmatBase.* and an executable GMAT_D.exe. I can't execute that unless I copy over the wx*.dll's from the application\bin folder into the debug folder. So, I copy them over and try to execute. I can see GMAT_D.exe pop up on the task manager, but then it disappears.

If I try to run it from VS2010, I go to Debug --> "Start Debugging" in VS2010, but that is followed by a stream of errors like those in the attached image. Clearly, I'm missing something. Can you offer some guidance on this?

Also, assumming I can get the previous step working, are the plugins set to allow for compilation in debug mode? Or does the user have to change something in the configuration for this to work.


There's a related question under this post:

viewtopic.php?f=55&t=43543&p=45109#p45109

Re: Building GMAT in Debug Mode

PostPosted: Thu Jul 12, 2012 8:48 pm
by davidf
See the apparent answer under the related post below.

http://gmat.ed-pages.com/forum/viewtopic.php?f=55&t=43543&p=45109#p45109

Re: Building GMAT in Debug Mode

PostPosted: Fri Jul 13, 2012 1:16 pm
by marchand
That's definitely a relevant issue, but it ultimately doesn't fix the problem. I recompiled the wxWidgets library via the Debug DLL configuration. That generated a series of dll's like it does for the Release version, but with a "d" for Debug in the name of the library file. I copied those libraries into the applications folder of GMAT, then I tried to compile GMAT in Debug mode. That built libGmatBase.dll, but when it went to Build GMAT_wxGUI the build failed with a link error:

Code: Select all
LINK : fatal error LNK1104: cannot open file 'wxregex.lib'


I'm wondering if it's a problem with the Debug configuration settings. I checked and the only dependencies on the wxWidget libraries are wxmsw28_netutils.lib and wxmsw28_stc.lib, two of the RELEASE versions of the libraries. The debug versions are called wxmsw28d_netutils.lib and wxmsw28d_stc.lib.

Can anyone offer some steps for how to build GMAT in Debug Mode? Apparently renaming the debug libraries to get rid of the "d" for Debug doesn't fix the problem.

Re: Building GMAT in Debug Mode

PostPosted: Fri Jul 13, 2012 3:10 pm
by jjkparker
There's a known issue with debug mode in our Visual Studio project. That's all I know... just that it doesn't work, and it's a high-priority item on our side to fix it. I believe next week will see a fix, but perhaps someone else on the team will know more.

Re: Building GMAT in Debug Mode

PostPosted: Fri Jul 13, 2012 3:17 pm
by marchand
Thanks for the update Joel! Even if there is currently no solution, it's good to know the issue is not an isolated incident.

Re: Building GMAT in Debug Mode

PostPosted: Tue Dec 31, 2013 5:13 am
by marchand
For completion, a later release of GMAT fixed the debug build. It's worked fine for months and runs great. Thanks to the GMAT team for getting that working! It makes life so much easier for developers.

Re: Building GMAT in Debug Mode

PostPosted: Tue Jan 07, 2014 1:37 pm
by jjkparker
That's what we like to hear! :)