Qt 5.4: how to write a file .pro



  • Hello everyone! I'm trying to use Qt for the firts time and I have some doubts about how to write a file.pro for a project.
    Specifically, I have to use VTK libraries but i don't understand how to communicate these libraries to my code.
    Thnaks for the help! :)



  • Hi and welcome to devnet,

    if you use Qt Creator you have a lot of wizard helping you.
    For other stuff the manual is your best friend



  • I would suggest using cmake instead of qmake in your project, as vtk provides
    cmake macros but no pkg-config or qmake files. Things will be much more simple.
    If you really want to go for qmake, you need to set LIBS & INCLUDPATHS manually
    to point to the vtk directories, but take note that this can easily break the compiling
    on other machines, if the VTK version is installed to different path or if the installed
    version is different as the VTK libs have a version suffix in their names.

    See http://doc.qt.io/qt-5/cmake-manual.html for more info on using cmake with Qt,
    and http://www.vtk.org/Wiki/VTK/Build_System_Migration for VTK specific bits.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.