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. [SOLVED] Problems linked to Debug mode

[SOLVED] Problems linked to Debug mode

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 2.8k 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.
  • S Offline
    S Offline
    Simpson67
    wrote on last edited by
    #1

    Hey,

    So I am working on a school project and I am using libvlc-qt. I had a lot of troubles compiling this lib with mingw and stuff but I finally managed to do it.
    My program is working perfectly fine in Release mode but in debug mode, I have the following error :

    bq. HEY
    QWidget: Must construct a QApplication before a QWidget
    Invalid parameter passed to C runtime function.

    The first line comes from a qDebug from the second line of my main function, the second comes from my program and the third one comes from the lib.
    I think that the third line means that libvlc-qt waits for a valid QApplication so that should not be the problem.
    Here is my main
    @#include <QApplication>
    #include "httpnetwork.h"
    #include "masterhandler.h"

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    qDebug() << "HEY";

    HttpNetwork http;
    MasterHandler m(&http);
    
    return a.exec(&#41;;
    

    }@

    I don't know if I gave enough details.. Let me know if you guys need more intel.
    I am trying to find a solution since a few days.. I read somewhere that it could be because my libvlc-qt is not in debug mode or smthing, so I tried to find a libvlc in debug mode in order to compile it for mingw like I did with the other version but it does not seem to exist.

    Sorry for the grammar, I am not native english speaker :)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gjdass
      wrote on last edited by
      #2

      Pretty the same here. Any help with that ?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome both to devnet,

        What version of Qt are you using ? Did you check that libvlc-qt was built with a matching version of Qt (i.e. 4 or 5) ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Simpson67
          wrote on last edited by
          #4

          I am using the latest version of QT (5.3). I must confess I had a lot of troubles to compile the libvlc-qt library from the original version to a MinGW version so I did not check the compatibility version.. Will in matter in my case?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Sorry, I misread your post, the version doesn't matter in this case since you have built the lib yourself with Qt 5. But for future references, you can't mix libraries using Qt 4 and Qt 5.

            So the other question, did you build libvlc-qt in debug and release ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Simpson67
              wrote on last edited by
              #6

              I build libvlc-qt in release mode because I can't find it in debug.. Is this the issue?

              If this is, any idea where I can find the debug mode files in order to compile them aswell?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                It's done when configuring before building

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Simpson67
                  wrote on last edited by
                  #8

                  This was such a stupid mistake by myself.. I did not know that I could compile in debug mode with the same source files from cmake..

                  Thanks a lot!

                  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