Libraries are different after moving to Qt
-
I've got a CMAKE project that builds a static library. When I try and create a Qt project to build the same library, I get different size files and the resulting application crashes.
I created a Qt project and imported all the source and headers . The following is the start of the .pro file
QT -= core gui
TARGET = serialc
TEMPLATE = lib
CONFIG += staticlibThe rest of the project file is pretty simple:
INCLUDEPATH += <path>
SOURCES += <source files>
HEADERS += <header files>My configuration is:
Windows 10 using Qt 4.8.0 and MinGW 5.10.1
I thought I might use the create the Qt project using the original CMakeLists.txt but that would never compile. I kept getting a kit must be configured. I could never figure out where I was going wrong so I dropped back to creating a static library project.
-
Hi and welcome to devnet,
Might be a silly question but why change from cmake ?
It's supported in Qt Creator. -
Then you can stay with cmake.
If that helps, it's also becoming the official build system for Qt 6. qmake will still be provided for project handling though.
-
@DannyS said in Libraries are different after moving to Qt:
I thought I might use the create the Qt project using the original CMakeLists.txt but that would never compile. I kept getting a kit must be configured.
My guess: You must tell Qt Creator where to find your copy of CMake. (see Tools > Options... > Kits > CMake)
You might have the same issue as https://forum.qt.io/topic/98469/another-no-valid-kits-found-error/
-
@DannyS said in Libraries are different after moving to Qt:
@SGaist
Thanks for your reply. Obviously, you haven't read my original post. Otherwise you would have seen that staying with CMAKE was not fruitful.Thanks anyway
I did but misunderstood what happened to you.