[Ubuntu 13.10, C++ project]
I have an existing project that breaks if I place the Code::Blocks project files in its folder structure. I don't know why, but it has something to do with the Makefile copying files into the 'build.host' folder it creates during the build.
So I set up a 'sideline' CB project in a separate folder such that they share the same parent. I've configured the make settings to use custom commands and custom makefile. I've also pointed all the folder names appropriately into the original project. Having done so, I can successfully build and clean the original project.
Now I need to debug the original project as there is something it's doing that isn't right.
When I click Debug/Continue, it rebuilds, starts the debugger, but then tells me that 'No executable file specified.'
From the logs below, it is clear why I get the error. The executable I want to debug is "/home/nap/src/mil/ganow/posix/gafsm/cldrm/clfrm" but the debugger is looking for "/home/nap/src/mil/ganow/posix/gafsm/cldrm_head/cldrm".
Where can I set the location of the executable which the debugger should use?
Another option is to get the executable into the .../cldrm_head folder somehow, but I have no idea how to do this through CB, and I cannot change the Makefile.
Any ideas please?
Cheers,
Nap
Build Log:
-------------- Build: host in cldrm (compiler: LLVM Clang Compiler)---------------
Running command: bmake CFLAGS?=-g host E=
mkdir -p build.host
rm -rf build.host/build.host
cp -p ../gasmf/*.c* ../gasmf/*.h build.host
cp -p *.c* *.h build.host
cp -p Makefile.in build.host/Makefile
cd build.host && ln -s . build.host
cd build.host && bmake host
mkdir -p build.host
bmake .MAKE.LEVEL.ENV=MAKELEVEL CFLAGS=-g E= pre-build
touch build.host/.pre-build-cookie
linking output build.host/cldrm
env /usr/bin/clang++ -rdynamic -o build.host/cldrm -g -lrt -stdlib=libstdc++ build.host/ga_util.o build.host/gagenericlistobject.o build.host/gatcpinjectionlistobject.o build.host/list.o build.host/gasimplelist.o build.host/galisttypelist_c_typestrings_generated.o build.host/cldrm_cc.o build.host/cldrm_machine.o build.host/cldrm_main.o -Wl,-R/usr/local/lib -L/usr/local/lib -lcldrm -ldl -ldispatch -lBlocksRuntime -lpthread_workqueue -lkqueue -lpthread -L/usr/lib/x86_64-linux-gnu -Wl,-R/usr/lib/x86_64-linux-gnu -lc++ -lsupc++
mkdir -p build.host
bmake .MAKE.LEVEL.ENV=MAKELEVEL CFLAGS=-g E= pre-build
touch build.host/.pre-build-cookie
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Debugger Log:
Building to ensure sources are up-to-date
Selecting target:
host
Adding source dir: /home/nap/src/mil/ganow/posix/gafsm/cldrm_head/
Adding source dir: /home/nap/src/mil/ganow/posix/gafsm/
Adding file: /home/nap/src/mil/ganow/posix/gafsm/cldrm_head/cldrm
Changing directory to: /home/nap/src/mil/ganow/posix/gafsm/cldrm
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /home/nap/src/mil/ganow/posix/gafsm/cldrm_head/cldrm
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1-ubuntu
Starting the debuggee failed: No executable file specified.
Debugger finished with status 0