How to have a compiled matlab GUI open a command-like window?

We have a older Matlab 2008b compiled / deployable GUI app, and when it opens, it first opens a window akin to a DOS command window, and it seems to show Matlab output that would appear to contain content that Matlab puts out to it's command window, land subsequently the GUI launches and both windows remain open. I'm able to recompile and run the app (still using Matlab 2008b--there are dependencies on that version) but when the app I build launches, I get the GUI window but not the command window.
I'm hoping that command window would give me some deubgging insight. I've scoured the Deployment Project Settings and can't find where to turn that command window on (or off). Example below. Any guidance or help on this?

Answers (1)

If you are not getting the DOS window then somehow you must have provided the -e option
Read the following in reverse:

7 Comments

Wow. Thanks for the quick reply.
So I need to just build a small text file with just "-e" in it and specify it here?
The -e flag removes the DOS window, so if your DOS window is not showing up, then somehow something is supplying the -e flag on your behalf; you have to track down why that is happening.
I see that you have marked Generate Verbose Output; if we could see the log file from the code generation, that could help a lot.
Yes, sorry I had that backwards. On the verbose, its very verbose. Below are the mcc lines I see with a bit of context.
Build output( 2023-11-21 10:06:21).
mcc -F 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\SW_11050_1_R2008b.prj'
Compiler version: 4.9 (R2008b)
Warning: Duplicate directory name:
C:\svn\p060082\Software\Testing\SW-11050-1\trunk.
mcc -o 'SW_11050_1' -W 'WinMain:SW_11050_1' -d 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\SW_11050_1_R2008b\src' -T 'link:exe' -v -N -M -I.\toolbox\ASPRealTime -M -I.\toolbox\xml_toolbox -M -I.\toolbox\LORD\Utilities -M -I.\toolbox\natinst\daq -M -I.\toolbox\natinst\daq\data -M -I.\lib -M -IC:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include -M -IC:\Program Files (x86)\Microsoft Visual Studio 8\VC\include -M -L.\toolbox\ASPRealTime -M -L.\toolbox\xml_toolbox -M -L.\toolbox\LORD\Utilities -M -L.\toolbox\natinst\daq -M -L.\toolbox\natinst\daq\data -M -LC:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib -M -l.\toolbox\ASPRealTime -M -l.\toolbox\xml_toolbox -M -l.\toolbox\LORD\Utilities -M -l.\toolbox\natinst\daq -M -l.\toolbox\natinst\daq\data -M -l.\lib 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\SW_11050_1.m' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\HAL_ATP_ConfigData.xml' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\theRawCBins.mat' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\lib\18x18 Red Led Off-1.jpg' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\lib\18x18 Red Led-1.jpg' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\lib\25x25 Green Circle Beveled.jpg' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\lib\25x25 Green Circle Dark Beveled.jpg' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\lib\25x25 Red Circle Beveled.jpg' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\lib\25x25 Red Circle Dark Beveled.jpg' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\data\libdata.llb' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\data\lvanlys.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\data\lvdaq.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\data\MIT_DAQExamples.llb' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\chamberState.xml' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\AcqNUpdates_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\AcqNUpdates_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\AcqThermocoupleSample_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\AcqThermocoupleSample_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\AcqTriggerStart_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\AcqTriggerStartAndRef_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContAcqChart_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContAcqExternalClock_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContAcqGraph_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContAcqNoWait_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContAcqSave_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContAcqTriggerStart_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContFuncGen_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ContGenDigPulseTrainCounter_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\DAQ_Demo_Browser.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\DAQ_UI_Demo_Browser.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\DisplayAcqFile_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\FiniteAcqExternalClock_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\FiniteAcqTriggerStartAndRef_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\FiniteSquareWaveGen_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\FuncGen_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\GenNUpdates_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\GenNUpdates_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\Launch_Examples_Help.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\NIHelp.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\OpenLVProductPage.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\PlotData.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ReadDigitalChannel_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ReadDigitalChannel_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ReadDigitalPort_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\ReadDigitalPort_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\SimultaneousAIAO_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\WriteDigitalChannel_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\WriteDigitalChannel_UI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\WriteDigitalPort_nonUI.dll' -a 'C:\svn\p060082\Software\Testing\SW-11050-1\trunk\toolbox\natinst\daq\WriteDigitalPort_UI.dll'
Processing C:\Program Files (x86)\MATLAB\R2008b\toolbox\matlab\mcc.enc
Processing C:\svn\p060082\Software\Testing\SW-11050-1\trunk\HAL_ATP_GUI.fig
The only -e option I see is in compopts.bat, on the DLL_MAKEDEF line, and I think that is just export libraries releated.
rem ********************************************************************
rem Library creation commands creating import and export libraries
rem ********************************************************************
set DLL_MAKEDEF=type %BASE_EXPORTS_FILE% | %PERL% -e "print \"LIBRARY %MEX_NAME%.dll\nEXPORTS\n\"; while (<>) {print;}" > %DEF_FILE%
For reference, here's the top of that bat file:
rem MSVC80FREECOMPP.BAT
rem
rem Compile and link options for use with MATLAB Compiler.
rem using the Microsoft® Visual C++ 2005 Express Edition compiler.
rem
rem $Revision: 1.1.8.4 $ $Date: 2008/05/27 18:20:56 $
rem
rem ********************************************************************
Thanks for the log extract, @Scott Musser
The only suspicious things I see there is that some of the file names were not properly quoted, in particular
-IC:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include -M -IC:\Program Files (x86)\Microsoft Visual Studio 8\VC\include
but if it was not parsing those somehow then you would have received several error messages, so it seems to be working out anyways.
Unfortunately I have barely worked with that toolchain so I don't think I have any further ideas at this time.
Hey, thanks for the feedback. At least I know I'm not missing something really easy and stupid on my part.

Sign in to comment.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Release

R2008b

Asked:

on 20 Nov 2023

Commented:

on 21 Nov 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!