Qt Creator: Difference between revisions

From Bitpost wiki
No edit summary
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
  Delete make step, replace with custom step:  
  Delete make step, replace with custom step:  
   cmd: ./build.sh
   cmd: ./build.sh
  working dir: %{buildDir}
>>>> WARNING: CLEAN DOESN'T WORK, it dumps to server/ instead of server/cmake-### TODO: solve that! meanwhile use command line to rerun cmake, it works fine!
Delete clean step, replace with custom step:
  cmd: ./clean.sh
   working dir: %{buildDir}
   working dir: %{buildDir}
** Copy release to debug and adjust it
** Copy release to debug and adjust it
Line 22: Line 26:
  Window-> Open in new window
  Window-> Open in new window
=== DEBUGGING ===
=== DEBUGGING ===
* I was able to build lws in debug, install in /usr/local, then I could step right into its code
See [[Development reference]].
m@case:~/development/causam/git/np/nop-bigress-client-c$ ./build_lws_debug
  Install the project...
  -- Install configuration: "DEBUG"
  -- Installing: /usr/local/lib/pkgconfig/libwebsockets.pc
  -- Installing: /usr/local/lib/libwebsockets.a
  -- Up-to-date: /usr/local/include/libwebsockets.h
  (etc)
* To debug into an included library that is not installed system-wide:
use Tools->Options->General->Source Paths Map
  source: /home/m/development/causam/git/nop-bigress-client-c/cmake-debug
    that's the COMPLETE PATH TO DEBUG EXE
  target: /home/m/development/causam/git/libwebsockets-master/lib
    at first i thought this would work: /usr/local/lib
    but i did a static build so i needed teh actual exe!  COOL

Latest revision as of 22:38, 11 December 2016

FEATURES

  • Effortless debugging
  • Full CMake support using CMakeLists.txt - Qt build and run parameters are stored in CMakeLists.txt.user

CONFIGURE

  • A new project defaults to an "all" build/run configuration; you will want build {debug|release} and run {debug|release} configs
    • Use the projects button in the sidebar
    • Rename "all" build to "release"
Build dir: ./cmake-release
Delete make step, replace with custom step: 
  cmd: ./build.sh
  working dir: %{buildDir}
>>>> WARNING: CLEAN DOESN'T WORK, it dumps to server/ instead of server/cmake-### TODO: solve that! meanwhile use command line to rerun cmake, it works fine!
Delete clean step, replace with custom step: 
  cmd: ./clean.sh
  working dir: %{buildDir}
    • Copy release to debug and adjust it
    • Rename run config to release
add arguments, eg: melange 8080 test reanalyze
working dir: use the project dir
[x] Run in terminal
    • Copy release to debug and adjust
  • Set up gnome-terminal to get command line input and output going
Tools->Options->Environment->Terminal-> dropdown should include: /usr/bin/gnome-terminal -x

USAGE

  • Clunky multi-window support; this gives you a new window that you can put on a different monitor; but you have to keep the Qt Creator command window around, don't use it to edit though bc ctrl-tab may pop you into another window
Window-> Open in new window

DEBUGGING

See Development reference.