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. Undefined symbols for architecture x86_64:

Undefined symbols for architecture x86_64:

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 2 Posters 4.2k 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.
  • A Offline
    A Offline
    alex111
    wrote on last edited by
    #1

    how to solve this problem?
    Undefined symbols for architecture x86_64:
    "_XCheckMaskEvent", referenced from:
    cimg_library::CImgDisplay::thread_lowlevel(void*) in args.o
    "_XCheckTypedEvent", referenced from:
    cimg_library::CImgDisplay::thread_lowlevel(void*) in args.o
    "_XCheckWindowEvent", referenced from:
    cimg_library::CImgDisplay::proc_lowlevel(_XEvent*) in args.o
    "_XCloseDisplay", referenced from:
    cimg_library::CImgDisplay::~CImgDisplay() in args.o
    "_XCreateColormap", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XCreateImage", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    cimg_library::CImgDisplay::resize(int, int, bool, bool) in args.o
    "_XCreateSimpleWindow", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XDestroyWindow", referenced from:
    cimg_library::CImgDisplay::~CImgDisplay() in args.o
    "_XFlush", referenced from:
    cimg_library::CImgDisplay& cimg_library::CImgDisplay::display<unsigned char>(cimg_library::CImg<unsigned char> const&, unsigned int, unsigned int) in args.o
    cimg_library::CImgDisplay::resize(int, int, bool, bool) in args.o
    "_XFreeColormap", referenced from:
    cimg_library::CImgDisplay::~CImgDisplay() in args.o
    "_XGetVisualInfo", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XGetWindowAttributes", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XInternAtom", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XLookupString", referenced from:
    cimg_library::CImgDisplay::proc_lowlevel(_XEvent*) in args.o
    "_XMapWindow", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XOpenDisplay", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XPutImage", referenced from:
    cimg_library::CImgDisplay& cimg_library::CImgDisplay::display<unsigned char>(cimg_library::CImg<unsigned char> const&, unsigned int, unsigned int) in args.o
    cimg_library::CImgDisplay::proc_lowlevel(_XEvent*) in args.o
    cimg_library::CImgDisplay::resize(int, int, bool, bool) in args.o
    "_XResizeWindow", referenced from:
    cimg_library::CImgDisplay::proc_lowlevel(_XEvent*) in args.o
    cimg_library::CImgDisplay::resize(int, int, bool, bool) in args.o
    "_XSelectInput", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    cimg_library::CImgDisplay::thread_lowlevel(void*) in args.o
    "_XSetWMProtocols", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XSetWindowColormap", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XStoreColors", referenced from:
    cimg_library::CImgDisplay::set_colormap(unsigned long&, unsigned int) in args.o
    "_XStoreName", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XUnmapWindow", referenced from:
    cimg_library::CImgDisplay::proc_lowlevel(_XEvent*) in args.o
    "_XVisualIDFromVisual", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    "_XWindowEvent", referenced from:
    cimg_library::CImgDisplay::new_lowlevel(char const*) in args.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [SimpleNGL.app/Contents/MacOS/SimpleNGL] Error 1
    01:43:52: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project SimpleNGL (kit: Desktop Qt 5.2.0 clang 64bit)
    When executing step 'Make'

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You are probably mixing architectures (your library is compiled for 32 bit, but you are compiling in a 64 bit environment). You need to link to a correct architecture.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alex111
        wrote on last edited by
        #3

        thanks for your reply! what i need to do? can u explain the detail? many thanks!
        [quote author="sierdzio" date="1407733457"]You are probably mixing architectures (your library is compiled for 32 bit, but you are compiling in a 64 bit environment). You need to link to a correct architecture.[/quote]

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Use 64 bit cimg library instead of a 32 bit one. I know to little about your setup (OS, .pro filecode showing library inclusion, Qt version) to say much more.

          (Z(:^

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alex111
            wrote on last edited by
            #5

            Many thanks sir! the pro file is:
            TEMPLATE = app
            INCLUDEPATH += /opt/X11/include

            Input

            HEADERS += args.h block.h CImg.h graph.h main.h
            SOURCES += args.cpp argsgraph.cpp graph.cpp main.cpp maxflow.cpp

            my os is:
            10. 9.4
            my qt version is:
            qt creator 3.0.0 Based on QT 5.2.0(Clang 4.2(Apple), 64 bit)
            [quote author="sierdzio" date="1407753306"]Use 64 bit cimg library instead of a 32 bit one. I know to little about your setup (OS, .pro filecode showing library inclusion, Qt version) to say much more.[/quote]

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              You are missing LIBS in there. It is not enough to include the header of a library, you need to tell the linker (ld) where it can find the library, so that it can be linked.

              See "the documentation":http://qt-project.org/doc/qt-5/qmake-variable-reference.html#libs.

              (Z(:^

              1 Reply Last reply
              0
              • A Offline
                A Offline
                alex111
                wrote on last edited by
                #7

                Really thank u, Sir! But the CImg's homage said that it doesn't need to compile it or do sth else, just include the Cimg.h, here is the link http://sourceforge.net/projects/cimg/files/
                Sorry for my poor english, i am not a native spearer, also it works on other people's red hat , but I don't know how to deal with here on my mac, can I send the code to your and let u have a look? if it's possible. Sorry to bother u!
                [quote author="sierdzio" date="1407753780"]You are missing LIBS in there. It is not enough to include the header of a library, you need to tell the linker (ld) where it can find the library, so that it can be linked.

                See "the documentation":http://qt-project.org/doc/qt-5/qmake-variable-reference.html#libs.[/quote]

                1 Reply Last reply
                0
                • sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  I see. It is uncomon to see a single header being named a library. I am not familiar with it. I suspect you need to first compile that into a library, and then include that library in your source code. But maybe it is intended to work in a different way.

                  (Z(:^

                  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