-
Notifications
You must be signed in to change notification settings - Fork 27
GettingStarted
~ stands for the root directory of Cardirector repo in the following texts.
-
Download the latest Qt installers from Qt http://qt.io/download
-
Install Qt and Qt Creator with the installer you choose according to your developing environment and targeting platform.
-
Open ~/Cardirector.pro with Qt Creator and configure your build directory.
-
Check the directory ~/include/, where there must be header files after qmake is executed.
-
Click Build or press Ctrl + B.
-
For different target OS, you'll get corresponding static library files in ~/lib/.
-
You may need dynamic library files instead. Edit Cardirector.pro, removing staticlib from CONFIG, i.e, remove or comment the line below and then execute qmake again.
CONFIG += staticlib
-
After rebuilding, you'll find *.dll in ~/bin/ and *.lib in ~/lib/ targeting Windows, and *.so or *.dylib in ~/lib/ for other operating systems.
-
Copy or move ~ into your Qt project.
-
If you intend to use the static library of Cardirector, you'll have to add the line below in your .pro
DEFINES += MCD_STATIC
-
Configure INCLUDEPATH, adding Cardirector/include/ as one of your include path.
INCLUDEPATH += Cardirector/include
-
Add a new library path Cardirector/lib/ into LIBS.
LIBS += -L"$$PRO_FILE_PWD/Cardirector/lib"
-
For dynamic library of Cardirector on Windows, you'll need to move *.dll into the root directory of your project.
-
For dynamic library of Cardirector on Android, you'll need to add the following line into your .pro
ANDROID_EXTRA_LIBS += $$PWD/Cardirector/lib/libCardirector.so
-
Add the following line to load the library.
LIBS += -l$$qtLibraryTarget(Cardirector)
-
In order to use resources and GUI module of Cardirector, you'll need to add MCD_INIT_GUI; into your main()