Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Create Library



  • Hi,

    I'm a computer science student, and I start to learn C, now I want to create a Library with a function, that I can include it in another project, but no kit appears, as shown in the attached image.0_1540425671818_Captura de Tela 2018-10-24 às 21.00.37.png


  • Lifetime Qt Champion

    hi @Tiecker, welcome.

    How did you install Qt and Creator? which version?

    Do you have Xcode on your machine?



  • My version is QtCreator 4.8.0-beta1 (v4.7.82), and I have Xcode in my machine, for C projects, I can run the programs, but, creating a library a can't use the same kit.



  • @Tiecker perhaps its better if you start off by creating a library project by hand, or in the very least by configuring a build automation script without the help of an IDE.

    I'm afraid Qt Developer's support for C is not exactly there in spite of supporting C compilers, and you'll end up either using qmake or cmake, which always require some level of manual configuration.

    Here's a link to a stack overflow question that includes detailed answers on how to setup a cmake build for a shared library project. Most answers follow cmake's modern target-based style, which includes some degree of hand-holding, but it's very effective in getting a minimal working example.


Log in to reply