Page 1 of 1

Debugger error: No executable specified, use 'target exec.'

Posted: Wed Feb 06, 2019 6:02 pm
by marjanstojchev
I have a problem with debuging.

At settings, I use absolute path for debugger and executable, but still I have the error message "Debugger error: No executable specified, use 'target exec.'".
I am doubting if I miss some config details. Build works, but debug shows the above message, as dialogue window. I use MinGW compailer, and gdb from MinGW.
What could be the problem?
Here is the config

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="AntennaPatterns" Version="10.0.0" InternalType="">
  <Plugins>
    <Plugin Name="qmake">
      <![CDATA[00010001N0005Debug000000000000]]>
    </Plugin>
  </Plugins>
  <Description/>
  <Dependencies/>
  <VirtualDirectory Name="unit_tests">
    <File Name="../../unit_tests/UnitTestsMain.cc"/>
  </VirtualDirectory>
  <VirtualDirectory Name="TestCases">
    <File Name="../../unit_tests/TestCases/TestCases.cc"/>
  </VirtualDirectory>
  <VirtualDirectory Name="interface">
    <File Name="../../AntennaPatterns/interface/NVMDataAntennaPatterns.h"/>
  </VirtualDirectory>
  <VirtualDirectory Name="portApi">
    <File Name="../../AntennaPatterns/portApi/NVMDataAntennaPatternsApi.h"/>
  </VirtualDirectory>
  <VirtualDirectory Name="source">
    <File Name="../../AntennaPatterns/source/NVMDataAntennaPatternsApi.c"/>
  </VirtualDirectory>
  <Settings Type="Dynamic Library">
    <GlobalSettings>
      <Compiler Options="" C_Options="" Assembler="">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="">
        <LibraryPath Value="."/>
      </Linker>
      <ResourceCompiler Options=""/>
    </GlobalSettings>
    <Configuration Name="Debug" CompilerType="MinGW ( MinGW )" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="-g" C_Options="-g" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="" Required="yes"/>
      <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="" IntermediateDirectory="./Debug" Command="C:/Projects/Antenna_Patterns/elf/ut_TestCases_pc.exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
      <BuildSystem Name="Default"/>
      <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
        <![CDATA[]]>
      </Environment>
      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="C:\Users\Stojchev\MinGW\Mingw\bin\gdb.exe" IsExtended="no">
        <DebuggerSearchPaths/>
        <PostConnectCommands/>
        <StartupCommands/>
      </Debugger>
      <PreBuild/>
      <PostBuild/>
      <CustomBuild Enabled="yes">
        <RebuildCommand/>
        <CleanCommand>make clobber</CleanCommand>
        <BuildCommand>make unit_build</BuildCommand>
        <PreprocessFileCommand/>
        <SingleFileCommand/>
        <MakefileGenerationCommand/>
        <ThirdPartyToolName>None</ThirdPartyToolName>
        <WorkingDirectory>$(WorkspacePath)/..</WorkingDirectory>
      </CustomBuild>
      <AdditionalRules>
        <CustomPostBuild/>
        <CustomPreBuild/>
      </AdditionalRules>
      <Completion EnableCpp11="no" EnableCpp14="no">
        <ClangCmpFlagsC/>
        <ClangCmpFlags/>
        <ClangPP/>
        <SearchPaths/>
      </Completion>
    </Configuration>
    <Configuration Name="Release" CompilerType="MinGW ( MinGW )" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="-O2" Required="yes"/>
      <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
      <BuildSystem Name="Default"/>
      <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
        <![CDATA[]]>
      </Environment>
      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no">
        <DebuggerSearchPaths/>
        <PostConnectCommands/>
        <StartupCommands/>
      </Debugger>
      <PreBuild/>
      <PostBuild/>
      <CustomBuild Enabled="yes">
        <RebuildCommand/>
        <CleanCommand>make clean</CleanCommand>
        <BuildCommand>make</BuildCommand>
        <PreprocessFileCommand/>
        <SingleFileCommand/>
        <MakefileGenerationCommand/>
        <ThirdPartyToolName>None</ThirdPartyToolName>
        <WorkingDirectory>$(WorkspacePath)</WorkingDirectory>
      </CustomBuild>
      <AdditionalRules>
        <CustomPostBuild/>
        <CustomPreBuild/>
      </AdditionalRules>
      <Completion EnableCpp11="no" EnableCpp14="no">
        <ClangCmpFlagsC/>
        <ClangCmpFlags/>
        <ClangPP/>
        <SearchPaths/>
      </Completion>
    </Configuration>
  </Settings>
</CodeLite_Project>
Greeting

Re: Debugger error: No executable specified, use 'target exec.'

Posted: Wed Feb 06, 2019 10:56 pm
by eranif
Don't use absolute paths, if you really need to, set the path to your executable in the 'Working directory' folder
Also, make sure that the executable is there. this error is coming from GDB when it usually fails to load the executable to debug