Converting c project to a desktop application [closed]
I have created a c/c++ program which uses opencv library. I want to convert it into desktop application which can be run by simply installing it on any system. Also can it be done so that user installing software does not need opencv. I mean it comes packaged with software
How this is done and can you point to some good book or tutorial? I want to create GUI also what are the recommendations for that
I want to create software both for windows and linux.
For C++ development I've been very satisfied with Qt development. Plus with great cross-platform support. Also you could look into wxWidgets.
You probably want to build an installer around your software. In Linux systems, this is usually done by using the autotools (autoconf
and automake
) to build a package and then inserting this package into your distribution, e.g. debianizing it. There is excellent documentation for this process.
Under Windows, you need to build an installer; I've made good experiences with the Inno Setup installer compiler.
In both cases, there would be no need to statically link against OpenCV. However, you might consider the easier alternative the other posters suggested and simply add -static to your linker command line. Depends on your needs.
That is a really open ended question. You can run a compiled C/C++ application from your desktop, so I presume a GUI is what you are wanting to add. Since you are saying Linux/Windows, you will either need to have good separation of your UI code and create a separate Windows & Linux frontend, or look into libraries that work for both (such as GTK+).
About not requiring a separate install of opencv, sure it can be done depending on the licensing of that library. Check their webpage/documentation to find out more. They might have good instructions about how to properly package it, and what if any steps to have to take to comply with their licensing model.
If you want a book or tutorial, you probably need to start at your library cause the scope of what you are asking about probably won't be covered in just one book. Actually, researching a bit would probably help you to better define exactly what you are trying to do.
There are tools to help you do that, some free and some paid.
izpack is free.
InstallJammer is free.
InstallBuilder is paid.
InstallAnywhere is also paid.
To avoid having the user install OpenCV, you can try to link statically to its binaries. Check the OpenCV documentation, it might have instructions to do that. As for a portable GUI for C++, there are even books about that, but a popular one seems to be wxWidgets .
There is also a question about portable C++ UI toolkits here in SO, check it out
精彩评论