суббота, 15 ноября 2014 г.

Debugging VW with QtCreator on Linux

While playing with Vowpal Wabbit I have struggled many times with impossibility to debug VW sources in IDE and check how exactly it works. As I've recently finally switched to Kubuntu I don't want to launch Win every time I'm facing small problems. And unfortunately VWs sources equipped with Visual Studio project files which doesn't support *nix platforms.

Finally I've forced myself to try building VW on Linux as Qt project with QtCeator IDE. Surprisingly it was very easy to do in just a few steps:

  1. Create empty console Qt project (delete auto-generated main.cpp)
  2. Import all VW's *.cc, *.cpp and *.h files in it except for active_interactor.cc
  3. Add following lines to .pro file and launch qmake:

    LIBS += -lboost_program_options -lz -lpthread
    QMAKE_CXXFLAGS += -std=c++11
Now you can build and debug vw in QtCreator. Of course, that's a minimalistic setup and doesn't contain many params from original make files. But still it's enough for checking how the things were done and vw modification for specific tasks.

Комментариев нет:

Отправить комментарий