Atomic_Sheep
20th May 2014, 13:03
Hello,
I'm trying to create my own library and include it in my own project, however I'm a bit stuck. I've managed to compile a .dll however when I go to add it into my project using the technique from:
http://qt-project.org/doc/qtcreator-2.7/creator-project-qmake-libraries.html
I can't see the .dll file and the only type of file that the pop up window allows is a .lib. Two questions arise:
1.) Firstly, how does one compile a .lib file? I have tried:
TEMPLATE = lib
CONFIG += staticlib
as per http://qt-project.org/doc/qt-4.8/qmake-common-projects.html
however, with this, I'm unable to get anything to compile, I just get the .o and .a files to be created but no binary.
TEMPLATE = lib
CONFIG += dll
works fine, a .dll is created without any problems.
2.) Secondly why isn't it possible to add a .dll file using the method of right clicking in the .pro file and clicking 'add library'? Is there a way of doing this? (apart from manually adding all the fields - the whole reason why I'm doing it using a wizard is to see what needs to be added... tried saving some time, but in the end, would have probably been quicker to read up on the .pro documentation and just do it manually but anyway.)
I'm trying to create my own library and include it in my own project, however I'm a bit stuck. I've managed to compile a .dll however when I go to add it into my project using the technique from:
http://qt-project.org/doc/qtcreator-2.7/creator-project-qmake-libraries.html
I can't see the .dll file and the only type of file that the pop up window allows is a .lib. Two questions arise:
1.) Firstly, how does one compile a .lib file? I have tried:
TEMPLATE = lib
CONFIG += staticlib
as per http://qt-project.org/doc/qt-4.8/qmake-common-projects.html
however, with this, I'm unable to get anything to compile, I just get the .o and .a files to be created but no binary.
TEMPLATE = lib
CONFIG += dll
works fine, a .dll is created without any problems.
2.) Secondly why isn't it possible to add a .dll file using the method of right clicking in the .pro file and clicking 'add library'? Is there a way of doing this? (apart from manually adding all the fields - the whole reason why I'm doing it using a wizard is to see what needs to be added... tried saving some time, but in the end, would have probably been quicker to read up on the .pro documentation and just do it manually but anyway.)