Problems with QtService in Qt4
-
Im new in the qt world and im working in a project that still use this version. My work right now is take the project compiled in VS2008 and runing in Unix Systems in Qt 4.8.2. My first attemp is with kdevelop, GCC, cmake and OpenSuse as operating systems. So far everything is going fine except for this error in the linking phase:
Undefined reference to QtServiceController.
In the VS2008 projects i put as additionals dependencies the file QtServiced.lib to work with this Class but in cmake i dont know how do that or what file or module i need to add to make this work fine. I hope that you can help me with this, im sure that the solution will be very easy but i just can´t find. -
Hi and welcome to devnet,
Are you referring to "that":http://doc.qt.digia.com/solutions/4/qtservice/qtservice.html class ? If so you first have to compile the corresponding module by hand before adding it to your project
-
But how i do that, what do i need? There is something like a step by step to do this?
-
Clone "this repository":https://qt.gitorious.org/qt-solutions/qt-solutions/ the instruction for the rest can be found in it
-
Hi again, and congratulations for the new year, i already have done all the instructions that i find in the doc of the repository, i already have the file libQtSolutions_Service-head.so.1.0.0 and 3 symbolic links for that file, I just I don´t know what is the next thing to do or how i am going to include this in my Cmakelists.txt file for a correctly linking. Thanks for all the help i hope that with your help i finish soon this task
-
You have to add the include path as well as lib path to your CMakelists.txt and add the resulting library to the list of libraries you are linking your application to.
-
The problem is that all i have is a .so file, and i think that what i need to include in my CMakeLists.txt is a .a file. That way i could make a static linking independent of OS. And also i don´t know if the way to include that i need to use is:
1- include(<path to my libQtSolutions_Service-head.so.1.0.0 >)
or
2-target_link_libraries(QtSolutions_Service) -
Static linking doesn't mean you're OS independent it means that you should be able to run your application on any computer using a similar OS e.g. Win7/Win8/WinVista. You can't run a Linux build application on Windows or OS X.
The include path is to find QtSolutions headers not libraries, that second one is a link path
-
Yes, i don´t express very well, i mean in similar OS without worry about if is installed the QtSolutions Library, anyway, what i need to do next? Because i still have the same problem.
-
Then the first thing you have to do is build Qt and QtSolutions statically