On 2016-12-08 01:52-0500 Pedro Vicente wrote: > > Hi Alan > > I have a wxWidgets application that I developed for Windows and Linux that > uses PLplot . > > I started having a segfault on the *Linux* only version. > > Debugging in Windows is a breeze with Visual Studio. > > For Linux I was able to make a QtCreator project to debug (yes, Qt debugging > wxWidgets !) > > However when I try to step into the PLplot code, there is no step into, > because probably debugging symbols were not built > > I used the following cmake call > > cmake .. -G "Unix Makefiles" -DBUILD_SHARED_LIBS:BOOL=OFF > -DENABLE_f95:BOOL=OFF -DENABLE_tcl:BOOL=OFF -DENABLE_tk:BOOL=OFF > -DCMAKE_INSTALL_PREFIX:PATH=/data/data127/pvicente/install/plplot-5.11.1 > -DPL_HAVE_PTHREAD:BOOL=OFF -DPLD_xwin:BOOL=OFF -DPLD_wxwidgets:BOOL=ON > -DwxWidgets_ROOT_DIR:PATH=/data/data127/pvicente/install/wxwidgets-3.1.0 > -DwxWidgets_LIB_DIR:PATH=/data/data127/pvicente/install/wxwidgets-3.1.0/lib > -DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON > -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF > > > this is more probably a cmake question, but I am not that familiar with > cmake, so the question is, > how can I add debug symbols to PLPlot for the above cmake call?
Hi Pedro: I think there are some specific CMake options for making sure the -g option is used on all compilations, but the one I always use is to set the appropriate environment variables (which CMake recognizes as well). So before executing cmake in an initially empty build tree do something like the following: export CXXFLAGS=-g export CFLAGS=-g export FFLAGS=-g I always just use the command line to build (with make) and debug (with gdb) rather than some IDE like QtCreator, but I assume setting the above environment variables will insure the QtCreator builds will be done with the -g option so that you can debug (likely with gdb doing the work in the background) with that IDE as well. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel