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. Debug output in a C++ library
Forum Updated to NodeBB v4.3 + New Features

Debug output in a C++ library

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 199 Views 2 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.
  • S Offline
    S Offline
    SteMMo
    wrote on 15 Mar 2024, 09:47 last edited by
    #1

    Hi all,
    I'm developing a pure C++ static library.
    This library is linked to a Qt application.
    How can I generate debug messages in the library?
    I'm developing with VS environment in Windows and VSCode on iOS.

    I'm trying with cout <<"xyz" and printf() but they are not shown in Debug window..

    Thanks!
    Regards

    S 1 Reply Last reply 15 Mar 2024, 16:28
    0
    • S SteMMo
      15 Mar 2024, 09:47

      Hi all,
      I'm developing a pure C++ static library.
      This library is linked to a Qt application.
      How can I generate debug messages in the library?
      I'm developing with VS environment in Windows and VSCode on iOS.

      I'm trying with cout <<"xyz" and printf() but they are not shown in Debug window..

      Thanks!
      Regards

      S Offline
      S Offline
      SamiV123
      wrote on 15 Mar 2024, 16:28 last edited by
      #2

      @SteMMo said in Debug output in a C++ library:

      Hi all,
      I'm developing a pure C++ static library.
      This library is linked to a Qt application.
      How can I generate debug messages in the library?
      I'm developing with VS environment in Windows and VSCode on iOS.

      I'm trying with cout <<"xyz" and printf() but they are not shown in Debug window..

      Thanks!
      Regards

      Redirect the stdout somewhere else such as a pipe or even just a file and read from there in the your Qt app.

      But you could also create an abstration for IO that your library uses and then your Qt host applicadtion can just implement it. Easier.

      1 Reply Last reply
      0
      • S SteMMo has marked this topic as solved on 18 Mar 2024, 10:19

      1/2

      15 Mar 2024, 09:47

      • Login

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