Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Network error when compiling with Qt5
Forum Update on Monday, May 27th 2025

Network error when compiling with Qt5

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 1.9k Views
  • 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.
  • M Offline
    M Offline
    Max13
    wrote on 23 Dec 2012, 00:52 last edited by
    #1

    Hello all !

    I wanted to install Qt5 on my Mac (Mountain Lion, Xcode and command line tools).
    Qt5 installs itself correctly, without any problem.

    I've dev a Rest Request manager library which I'm using on my other projects. I've upgraded my MXRequestManager (the lib) to Qt5 (.pro, JSON support and else), I've compiled the lib and everything went correctly (Compiled on release mode and installed).

    I wanted to recompile my project (the one using my lib), I've changed nothing on it, except the "QT" variable in the .pro, and the "LIB" variable to add my lib.
    When compiling (Debug and release mode), I have an error about a not found directory: @warning : directory not found for option '-F/Users/Max13/Qt5.0.0/5.0.0/clang_64/qtbase/lib'@

    No problem, I'm not using this dir, I've installed my lib in: @/Users/Max13/Qt5.0.0/5.0.0/clang_64/lib@

    Now, we're reaching the end, I try to "execute without deploy" (debug mode), and when doing a request ("QTBUG-27908":https://bugreports.qt-project.org/browse/QTBUG-27908):
    @objc[15518]: Class QNSListener is implemented in both /Users/Max13/Qt5.0.0/5.0.0/clang_64/plugins/bearer/libqcorewlanbearer.dylib and /Users/Max13/Qt5.0.0/5.0.0/clang_64/plugins/bearer/libqcorewlanbearer_debug.dylib. One of the two will be used. Which one is undefined.@

    Then, the request fails with network error 2 (Connection closed).

    Here are my tests:
    Lib in Qt4.8.1 + Project in Qt4.8.1 = Everything is fine (Compiler warning about MacOSX not supported).
    Lib in Qt4.8.1 + Project in Qt5 = Network error 2 + Class QNSListener thing.
    Lib in Qt5 + Project in Qt4.8.1 = Seems to be OK. No error (except the not found dir above).
    Lib in Qt5 + Project in Qt5 = Network error 2 + Class QNSListener thing.

    Ok, my project could be badly developed, but here is the ONLY change between Project in Qt4.8.1 and Qt5:
    In .pro:
    @QT += widgets network # Replaced "gui" by "widgets"
    LIB += -L/Users/Max13/Qt5.0.0/5.0.0/clang_64/lib -lMXRequestManager # Written directely@

    Do anyone have an idea of: 1) Why I have the Class QNSListener error, 2) Why the error about an unknown and written nowhere directory (CF: warning), 3) Why connection closed immediately ?

    Thank you for you help, and for have read all this ^^

    We all have started by asking questions. Then after some time, we can begin answering them.

    1 Reply Last reply
    0

    1/1

    23 Dec 2012, 00:52

    • Login

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