Results 1 to 5 of 5

Thread: using Carbon api on mac error:Undefined symbols for architecture x86_64

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2015
    Location
    Beijing,China
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question using Carbon api on mac error:Undefined symbols for architecture x86_64

    Hi

    I'm using Qt5.3(qt-opensource-mac-x64-clang-5.3.1.dmg) on mac os x 10.10.1,xcode6

    I need to use the GetKeys() in carbon in a staticlib,so I did the following:
    1).add header file in .cpp
    Qt Code:
    1. #include <Carbon/Carbon.h>
    To copy to clipboard, switch view to plain text mode 
    2).add framework include in xxx.pro
    Qt Code:
    1. LIBS += -framework Carbon
    To copy to clipboard, switch view to plain text mode 

    mylib compiles ok,but when myapp to link the lib, it throws error:
    Qt Code:
    1. Undefined symbols for architecture x86_64:
    2. "_GetKeys", referenced from:
    3. Platform::get_keyboard_modifiers() in libxxx.a(platform.o)
    4. ld: symbol(s) not found for architecture x86_64
    5. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    To copy to clipboard, switch view to plain text mode 

    I've tryed to add QMAKE_LFLAGS += -L/System/Library/Frameworks/Carbon in xxx.pro,but it didn't work.

    can anyone tell me why,or is there a way in Qt to take the place of Carbon/GetKeys()?
    Thanks
    Last edited by fong; 2nd April 2015 at 03:23.

Similar Threads

  1. Replies: 1
    Last Post: 13th January 2014, 20:30
  2. Qt + cocoa : Undefined symbols for architecture x86_64
    By karankumar1609 in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2013, 08:43
  3. no debug symbols in executable (-arch x86_64)
    By bruce2011 in forum Qt Programming
    Replies: 2
    Last Post: 24th August 2011, 14:42
  4. Replies: 0
    Last Post: 16th June 2011, 21:48
  5. qmake: detecting x86_64 architecture?
    By akos.maroy in forum Qt Programming
    Replies: 3
    Last Post: 2nd August 2008, 11:26

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.