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. Qt 5.3.1 static build on OSX 10.9
Forum Updated to NodeBB v4.3 + New Features

Qt 5.3.1 static build on OSX 10.9

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 1.0k 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.
  • E Offline
    E Offline
    eranders
    wrote on last edited by
    #1

    Hi all,
    I've been struggling for a few days trying to get a static build of Qt created with all the appropriate symbols defined. The overall goal is to create a small static library that can read/validate some XML files, nothing too fancy. Using the following configure line:

    ./configure -static -no-framework -nomake examples -nomake tests
    make -j4

    Results int he build succeeding. However, when linking to create the library, I get a host of linker errors with undefined symbols. An example:

    Undefined symbols for architecture x86_64:
    "QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)", referenced from:
    EGIXML::EGIXMLFileReader::validate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libEGIXML.a(EGIXMLFileReader.cpp.o)

    Upon further inspection:

    $ nm /usr/local/Qt-5.3.1/lib/libQt5Core.a | grep QArrayData | grep deallocate

    ALL symbols matching the greps are tagged as undefined.

    If I do the same thing in a shared library build, I get no undefined symbols. Am I just missing something super obvious that I just forgot somewhere? I have verified (using the verbose build flags) that things are being build with -fPIC

    Thanks in advance.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      che1404
      wrote on last edited by
      #2

      Hi,
      did you finally compile Qt statically on OSX?

      Thanks.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        eranders
        wrote on last edited by
        #3

        No, I could not get a static build to work. Instead, I am enforcing the dynamic libraries instead.

        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