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

external links



  • I am trying to upgrade an existing and working c program that communicates to a device via usbhid program.
    I have all the QT GUI stuff working fine, but now I need to add the additional links to all the usb programs.
    It is open source, so I can see all the code.
    I tracked back all the links and libraries needed and get NO errors.
    I also get no verified communications.
    I recreated the header files directly in the QT headers and copy/pasted the code just to make it part of the code instead of a link.

    Any suggestions on the proper linking and debugging to verify?

    I know this is vague, but I am looking more about QT style and prefered programming for C++.


  • Lifetime Qt Champion

    Hi
    Not sure what you are after so forgive if total miss :
    You can add external files via the .pro file.
    note the ALLPO paths. ( its sample so bit ugly)
    those points to a folder above the project folder with some common files.
    It could be anywhere on your PC. But it will get messy soon :)
    And then i would set some breakpoints into the "old" code at
    critical functions and see if all get up and running.

    SOURCES += main.cpp\
        mainwindow.cpp \
        pxstyler.cpp \  
        ../AllPO/Source/Common/Platform/Trace/Terminal.cpp \
     ...
    HEADERS  += mainwindow.h \
        configuration_dialog.h \
        ../AllPO/Source/Common/Platform/Trace/Trace.h \
    ....
    INCLUDEPATH += $$PWD/../AllPO/Source/Common/Platform/Trace \
        $$PWD/../AllPO/Source/Common/Platform/Trace \
    ....
    

  • Qt Champions 2019

    @Bob-W said in external links:

    I also get no verified communications.

    If I understand you correctly you already can build your app with UI and that C code, right? So, you have an executable? But the communication does not work? In this case you need to debug your app to see what happens. Does your UI already call this C stuff?



  • @jsulm
    NO, I already have a terminal based c program that works fine.
    Now I want to transfer the functionality to QT for the GUI interface.

    I have a #include " program.h" in the main program that does not trigger a break in the program.h in the headers.


  • Qt Champions 2019

    @Bob-W said in external links:

    I have a #include " program.h" in the main program that does not trigger a break in the program.h in the headers.

    It's not enough to include the header - you should use that code. For me its not clear what you did and what does not work.


Log in to reply