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. code only compile in dinamically mode
Qt 6.11 is out! See what's new in the release blog

code only compile in dinamically mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • RIVOPICOR Offline
    RIVOPICOR Offline
    RIVOPICO
    wrote on last edited by RIVOPICO
    #1

    Hi guys. I am trying to compile my program but i only can compile in dinamic mode.
    When i do build static i got this:

    Code
    void MainWindow::lookupServers()
    {
    // Create a DNS lookup.
    QDnsLookup *dns = new QDnsLookup(this);
    connect(dns, SIGNAL(finished()),
    this, SLOT(handleServers()));

    // Find the XMPP servers for gmail.com
    dns->setType(QDnsLookup::SRV);
    dns->setName("_xmpp-client._tcp.gmail.com");
    dns->lookup();
    

    }
    Error; crash tool:
    Starting C:\Qt\Qt5.2.0\Tools\QtCreator\bin\build-qdnslookup-Unnamed-Debug\debug\qdnslookup.exe...
    The program has unexpectedly finished.
    C:\Qt\Qt5.2.0\Tools\QtCreator\bin\build-qdnslookup-Unnamed-Debug\debug\qdnslookup.exe crashed

    So maybe my built is wrong, any suggestion is good received

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

      Hi,

      Run your application through the debugger. You are likely accessing an invalid pointer somewhere.

      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
      • RIVOPICOR Offline
        RIVOPICOR Offline
        RIVOPICO
        wrote on last edited by
        #3

        i tried mode release worked fine

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

          That doesn't mean you don't have a bug somewhere. Please, run your debug build with the debugger on. That should help pin-point the problem.

          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

          • Login

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