Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why is one subproject shown but not another?
Qt 6.11 is out! See what's new in the release blog

Why is one subproject shown but not another?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 410 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • StokestackS Offline
    StokestackS Offline
    Stokestack
    wrote on last edited by Stokestack
    #1

    I have a simple Qt 5 project using CMake, which I'm just starting to learn. I'm on a Mac.

    I have a parent project, into which I want to incorporate two libs statically. There's a C lib, and then a C++ lib that wraps it (the Paho MQTT libs). I guess in the end I only need the C++ one...

    Yes those are directory names.

    And yes those are directory names, despite the .c/.cpp extensions. I have the C lib building and linking into the application, and it works. Now I'm trying to build the C++ wrapper for it, and have encountered two problems.

    1. Even though I've added it to the top-level CMakeLists.txt file with add_subdirectory, it doesn't appear in the project tree. But the C lib, added the same way, does. I know it's getting processed, because it issues a build-failure string about problem #2 below.

    2. The C++ wrapper build fails because it can't find the C lib. The top-level Qt project builds into a library outside the source, per its default. The C libs get deposited into that structure. But I don't know how to communicate that to the C++ wrapper build, whose CMakeLists.txt seems to make some incompatible location assumptions. I don't know how anyone would be able to help me on that without my pasting all of the CMakeLists.txt files somewhere, and I don't think it's really Qt-specific. But hey, if anyone is down, I'll post 'em...

    jsulmJ 1 Reply Last reply
    0
    • StokestackS Stokestack

      I have a simple Qt 5 project using CMake, which I'm just starting to learn. I'm on a Mac.

      I have a parent project, into which I want to incorporate two libs statically. There's a C lib, and then a C++ lib that wraps it (the Paho MQTT libs). I guess in the end I only need the C++ one...

      Yes those are directory names.

      And yes those are directory names, despite the .c/.cpp extensions. I have the C lib building and linking into the application, and it works. Now I'm trying to build the C++ wrapper for it, and have encountered two problems.

      1. Even though I've added it to the top-level CMakeLists.txt file with add_subdirectory, it doesn't appear in the project tree. But the C lib, added the same way, does. I know it's getting processed, because it issues a build-failure string about problem #2 below.

      2. The C++ wrapper build fails because it can't find the C lib. The top-level Qt project builds into a library outside the source, per its default. The C libs get deposited into that structure. But I don't know how to communicate that to the C++ wrapper build, whose CMakeLists.txt seems to make some incompatible location assumptions. I don't know how anyone would be able to help me on that without my pasting all of the CMakeLists.txt files somewhere, and I don't think it's really Qt-specific. But hey, if anyone is down, I'll post 'em...

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Stokestack Do you have any errors when running cmake?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved