no executable specified use 'target exec'

General questions regarding the usage of CodeLite
Rory
CodeLite Enthusiast
Posts: 29
Joined: Wed Nov 14, 2012 3:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

no executable specified use 'target exec'

Post by Rory »

I would like to debug a dll by running it through a host program. I do this on Linux all the time without a problem, but on Windows I'm getting a 'no executable specified use target exec'. I've specified the program to run/debug by clicking the browse button and selecting the .exe in the project settings. Any ideas as to what the problem might be? The dll is building fine, here's my build output:

Code: Select all

MESSAGE: Entering directory `C:\Users\Rory\Documents\SourceCode\cabbageaudio\cabbage\Builds\Windows'
C:\Windows\system32\cmd.exe /c "make -f CabbagePluginSynth.mak debug"
----------Building project:[ Plugin -  ]----------
cmd /c if not exist bin\\Debug md bin\\Debug
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_gui_basics md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_gui_basics
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_graphics md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_graphics
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_gui_extra md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_gui_extra
cmd /c if not exist obj\\Debug\\__\\__\\Source\\Plugin md obj\\Debug\\__\\__\\Source\\Plugin
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_formats md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_formats
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_utils md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_utils
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_processors md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_processors
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_basics md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_basics
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_devices md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_devices
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_data_structures md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_data_structures
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_events md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_events
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_cryptography md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_cryptography
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_core md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_core
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_plugin_client\\utility md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_plugin_client\\utility
cmd /c if not exist obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_plugin_client\\VST md obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_plugin_client\\VST
cmd /c if not exist obj\\Debug\\__\\__\\Source md obj\\Debug\\__\\__\\Source
g++.exe -shared  -LC:\Users\Rory\Documents\SourceCode\cabbageaudio\csound6-git\build obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_gui_basics\\juce_gui_basics.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_graphics\\juce_graphics.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_gui_extra\\juce_gui_extra.o  obj\\Debug\\__\\__\\Source\\CabbageMainPanel.o  obj\\Debug\\__\\__\\Source\\CabbagePropertiesDialog.o  obj\\Debug\\__\\__\\Source\\CabbageTable.o  obj\\Debug\\__\\__\\Source\\ComponentLayoutEditor.o  obj\\Debug\\__\\__\\Source\\DirectoryContentsComponent.o  obj\\Debug\\__\\__\\Source\\Plugin\\CabbagePluginEditor.o  obj\\Debug\\__\\__\\Source\\Plugin\\CabbagePluginProcessor.o  obj\\Debug\\__\\__\\Source\\Soundfiler.o  obj\\Debug\\__\\__\\Source\\XYPad.o  obj\\Debug\\__\\__\\Source\\XYPadAutomation.o  obj\\Debug\\__\\__\\Source\\csPerfThread.o  obj\\Debug\\__\\__\\Source\\BinaryData.o  obj\\Debug\\__\\__\\Source\\CabbageCallOutBox.o  obj\\Debug\\__\\__\\Source\\CabbageGUIClass.o  obj\\Debug\\__\\__\\Source\\CabbageLookAndFeel.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_formats\\juce_audio_formats.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_utils\\juce_audio_utils.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_processors\\juce_audio_processors.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_basics\\juce_audio_basics.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_devices\\juce_audio_devices.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_data_structures\\juce_data_structures.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_events\\juce_events.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_cryptography\\juce_cryptography.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_core\\juce_core.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_plugin_client\\utility\\juce_PluginUtilities.o  obj\\Debug\\__\\__\\JuceLibraryCode\\modules\\juce_audio_plugin_client\\VST\\juce_VST_Wrapper.o   -o bin\\Debug\\CabbagePlugin.dll  -lgdi32 -luser32 -lkernel32 -lcomctl32 -lcomdlg32 -limm32 -lole32 -loleaut32 -lrpcrt4 -lshlwapi -luuid -lversion -lwininet -lwinmm -lws2_32 -lwsock32 C:\Users\Rory\Documents\SourceCode\cabbageaudio\csound6-git\build\libcsound64.dll.a
0 errors, 56 warnings, total time: 00:00:12 seconds
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by eranif »

Please provide the debugger log
HOW TO POST

Eran
Make sure you have read the HOW TO POST thread
Rory
CodeLite Enthusiast
Posts: 29
Joined: Wed Nov 14, 2012 3:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by Rory »

That's the thing, I can't get to the debugger output as the debugger never gets going? Just as it is about to launch I get that no executable message? I've attached the project file. You'll see the program I've selected to run the .dll with there.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by eranif »

The fact that you got the "no exe" message means that the debugger started properly - but it could not find an executable to debug
If the debug layout closes too quick - restore it from: Perspective -> Debug and copy / paste the debugger output tab content here

Eran
Make sure you have read the HOW TO POST thread
Rory
CodeLite Enthusiast
Posts: 29
Joined: Wed Nov 14, 2012 3:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by Rory »

Thanks, I didn't know about the perspective menu commands! Here you go:

Code: Select all

Using gdbinit file: C:\Users\Rory\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin
Launching gdb from : ./Debug
Starting debugger  : gdb --command="C:\Users\Rory\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "../../../JUCE/extras/audio plugin host/Builds/CodeBlocks/bin/Debug/Plugin Host.exe"
DEBUG>>set  new-console on
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
DEBUG>>python
DEBUG>>import sys
DEBUG>>sys.path.insert(0, 'C:\Users\Rory\AppData\Roaming\CodeLite\gdb_printers')
DEBUG>>from libstdcxx.v6.printers import register_libstdcxx_printers
DEBUG>>register_libstdcxx_printers (None)
DEBUG>>from qt4 import register_qt4_printers
DEBUG>>register_qt4_printers (None)
DEBUG>>from wx import register_wx_printers
DEBUG>>register_wx_printers (None)
DEBUG>>end
DEBUG>>00000001-break-insert -f -t main
Debug session started successfully!
DEBUG>>00000002-exec-arguments 
DEBUG>>00000003-exec-run 
DEBUG>>=thread-group-added,id="i1"
=thread-group-added,id="i1"
DEBUG>>~"GNU gdb (GDB) 7.6\n"
GNU gdb (GDB) 7.6
DEBUG>>~"Copyright (C) 2013 Free Software Foundation, Inc.\n"
Copyright (C) 2013 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"\nand "show warranty" for details.
DEBUG>>~"This GDB was configured as \"i686-w64-mingw32\".\nFor bug reporting instructions, please see:\n"
This GDB was configured as "i686-w64-mingw32".\nFor bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>&"../../../JUCE/extras/audio: No such file or directory.\n"
DEBUG>>&"C:\\Users\\Rory\\Documents\\SourceCode\\cabbageaudio\\CabbageCodLite\\Plugin/plugin: No such file or directory.\n"
DEBUG>>&"Traceback (most recent call last):\n"
DEBUG>>&"  File \"<string>\", line 5, in <module>\n"
DEBUG>>&"  File \"c:\\mingw-4.7.1\\share\\gdb/python/../../gcc-4.8.1/python/libstdcxx/v6/printers.py\", line 911, in register_libstdcxx_printers\n"
DEBUG>>&"    gdb.printing.register_pretty_printer(obj, libstdcxx_printer)\n"
DEBUG>>&"  File \"c:\\mingw-4.7.1\\share\\gdb/python/gdb/printing.py\", line 146, in register_pretty_printer\n"
DEBUG>>&"    printer.name)\n"
DEBUG>>&"RuntimeError: pretty-printer already registered: libstdc++-v6\n"
DEBUG>>&"C:\\Users\\Rory\\AppData\\Local\\Temp\\codelite_gdbinit.txt:13: Error in sourced command file:\n"
DEBUG>>&"Error while executing Python code.\n"
DEBUG>>&"set  new-console on\n"
DEBUG>>=cmd-param-changed,param="new-console",value="on"
=cmd-param-changed,param="new-console",value="on"
DEBUG>>^done
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>=cmd-param-changed,param="unwindonsignal",value="on"
=cmd-param-changed,param="unwindonsignal",value="on"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>=cmd-param-changed,param="breakpoint pending",value="on"
=cmd-param-changed,param="breakpoint pending",value="on"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>=cmd-param-changed,param="width",value="4294967295"
=cmd-param-changed,param="width",value="4294967295"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>&"python\n"
DEBUG>>&"Traceback (most recent call last):\n"
DEBUG>>&"  File \"<string>\", line 4, in <module>\n"
DEBUG>>&"  File \"c:\\mingw-4.7.1\\share\\gdb/python/../../gcc-4.8.1/python/libstdcxx/v6/printers.py\", line 911, in register_libstdcxx_printers\n"
DEBUG>>&"    gdb.printing.register_pretty_printer(obj, libstdcxx_printer)\n"
DEBUG>>&"  File \"c:\\mingw-4.7.1\\share\\gdb/python/gdb/printing.py\", line 146, in register_pretty_printer\n"
DEBUG>>&"    printer.name)\n"
DEBUG>>&"RuntimeError: pretty-printer already registered: libstdc++-v6\n"
DEBUG>>&"Error while executing Python code.\n"
DEBUG>>^error,msg="Error while executing Python code."
^error,msg="Error while executing Python code."
DEBUG>>&"No symbol table is loaded.  Use the \"file\" command.\n"
DEBUG>>00000001^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="<PENDING>",pending="main",times="0",original-location="main"}
Storing internal breakpoint ID=1
DEBUG>>=cmd-param-changed,param="args",value=""
=cmd-param-changed,param="args",value=""
DEBUG>>00000002^done
DEBUG>>00000003^error,msg="No executable specified, use `target exec'."
Debug session ended
No executable specified, use `target exec'.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by eranif »

Using gdbinit file: C:\Users\Rory\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin
Launching gdb from : ./Debug
It seems that gdb is searching for the executable at: "../../../JUCE/extras/audio plugin host/Builds/CodeBlocks/bin/Debug/Plugin Host.exe"
The working directory is set to:

C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin\Debug

Can you confirm that this file do exists?
If not, try fixing this from the "General" page of the project settings

Eran
Make sure you have read the HOW TO POST thread
Rory
CodeLite Enthusiast
Posts: 29
Joined: Wed Nov 14, 2012 3:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by Rory »

Yes, they exist. One thing that I find strange is this:

Current working dir: C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin
Launching gdb from : ../../cabbage/Builds/Windows/bin/Debug
Starting debugger : gdb --command="C:\Users\Rory\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "../../../JUCE/extras/audio plugin host/Builds/CodeBlocks/bin/Debug/Plugin Host.exe"

The current working dir is set to "C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin" yet as you can see from the screenshot, it should be set to the debug folder in that dir?
Untitled.png
The debug output also reports:

DEBUG>>&"C:\\Users\\Rory\\Documents\\SourceCode\\cabbageaudio\\cabbage\\Builds\\Windows\\bin\\Debug/plugin: No such file or directory.\n"

When in fact I think it should be CabbagePlugin.dll? I'm using a custom make file, is there a way to explicitly set the dll file name? I've attached the latest debug output.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec'

Post by eranif »

Rory wrote:The current working dir is set to "C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin" yet as you can see from the screenshot, it should be set to the debug folder in that dir?
And this is what codelite does:
"Current working dir" - means that this is the current working directory (before it changes it)
Rory wrote:Launching gdb from : ../../cabbage/Builds/Windows/bin/Debug
This is where codelite does the "cd" and this is what you need to confirm:

Does this directory ("../../cabbage/Builds/Windows/bin/Debug") exists when your working directory is set to "C:\Users\Rory\Documents\SourceCode\cabbageaudio\CabbageCodLite\Plugin"?
If not, try to clear the "Working directory" and reselect the binary to debug "Program"

Eran
Make sure you have read the HOW TO POST thread
Rory
CodeLite Enthusiast
Posts: 29
Joined: Wed Nov 14, 2012 3:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable specified use 'target exec' [edit]

Post by Rory »

Looks like it was the spaces in file name and path. It's all working fine now. I've been using CodeLite on daily basis for the past year on Linux and have found it to be nothing short of perfect for my development needs. Hopefully, I'll have the same experience on Windows.
Post Reply