Results 1 to 13 of 13

Thread: [Mac] Compile Qt

  1. #1
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default [Mac] Compile Qt

    Hello,

    I am trying to compile Qt 4.6 for Mac OS X Snow Leopard but I have some difficulties.
    When I run ./configure I have some errors and I don't know how to fix them.

    Here are the errors :

    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:42:20: error: stdlib.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:43:19: error: stdio.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:44:43: error: CoreFoundation/CoreFoundation.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:45:27: error: Carbon/Carbon.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp: In function ‘int main(int, const char**)’:
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:53: error: ‘CFURLRef’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:53: error: expected `;' before ‘cfurl’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:54: error: ‘OSStatus’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:54: error: expected `;' before ‘err’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:55: error: ‘err’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:55: error: ‘noErr’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:58: error: ‘CFBundleRef’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:58: error: expected `;' before ‘bundle’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:59: error: ‘bundle’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:62: error: ‘CFStringRef’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:62: error: expected `;' before ‘str’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:63: error: ‘str’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:63: error: ‘CFStringGetCStringPtr’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:77: error: ‘strlen’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/dwarf2.test: line 22: ./xcodeversion: No such file or directory
    rm: xcodeversion: No such file or directory
    Thanks.
    Bye.

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [Mac] Compile Qt

    I could be wrong, but don't you need to install xcode if you want to build from source?

  3. #3
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default Re: [Mac] Compile Qt

    I have already installed xCode from the CD. My version is 3.2.1

  4. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [Mac] Compile Qt

    perhaps stating the obvious, but have you followed these instructions?

    http://doc.qt.nokia.com/4.6/install-mac.html
    Last edited by schnitzel; 2nd December 2009 at 16:35. Reason: updated contents

  5. #5
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default Re: [Mac] Compile Qt

    Yes, of course.
    In fact, I have a problem during the 3rd step. The first step doesn't concern me, and the second one is hard not to succeed

  6. #6
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [Mac] Compile Qt

    I assume you are installing in the default place, so you didn't use the -prefix option - right?

    what is your path set to when you run configure?

    try some of the suggestions on this page:
    http://psi-im.org/wiki/Build_Instruc...x_.26_Mac_OS_X
    Last edited by schnitzel; 2nd December 2009 at 19:45. Reason: updated contents

  7. #7
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default Re: [Mac] Compile Qt

    Indeed, I didn't use the -prefix option.

    By default, it install Qt here : /usr/local/Trolltech/Qt-4.6.0

    Thanks for your page, but still nothing good

    Thanks for helping me

    EDIT :
    When I run ./configure, I am in the folder created after decompressing the downloaded file.
    Last edited by Tibo6; 2nd December 2009 at 20:18.

  8. #8
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [Mac] Compile Qt

    so what does your path look like when you run configure.

    being in the extracted folder should be the right place btw.

  9. #9
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default Re: [Mac] Compile Qt

    My PATH : /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Developer/usr/bin

    I tried to compile xcodeversion.cpp my self with xcode. It works, but I have the same errors anyway.

  10. #10
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [Mac] Compile Qt

    one last suggestion, run configure with the verbose flag. Hopefully that will give some more clues.

    I will have access to a Mac tomorrow, but that one isn't mine and has the vanilla binary install, which I don't really want to mess with.

  11. #11
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default Re: [Mac] Compile Qt

    ./configure -v :

    Determining system architecture... (Darwin:10.2.0:i386)
    'macosx' is supported
    System architecture: 'macosx'
    Precompiled-headers support enabled.
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:42:20: error: stdlib.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:43:19: error: stdio.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:44:43: error: CoreFoundation/CoreFoundation.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:45:27: error: Carbon/Carbon.h: No such file or directory
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp: In function ‘int main(int, const char**)’:
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:53: error: ‘CFURLRef’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:53: error: expected `;' before ‘cfurl’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:54: error: ‘OSStatus’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:54: error: expected `;' before ‘err’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:55: error: ‘err’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:55: error: ‘noErr’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:58: error: ‘CFBundleRef’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:58: error: expected `;' before ‘bundle’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:59: error: ‘bundle’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:62: error: ‘CFStringRef’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:62: error: expected `;' before ‘str’
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:63: error: ‘str’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:63: error: ‘CFStringGetCStringPtr’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/xcodeversion.cpp:77: error: ‘strlen’ was not declared in this scope
    /qt-everywhere-opensource-src-4.6.0/config.tests/mac/dwarf2.test: line 22: ./xcodeversion: No such file or directory
    rm: xcodeversion: No such file or directory
    DWARF2 debug symbols enabled.
    Xarch support detected
    Separate debug info check skipped, QMAKE_OBJCOPY is unset.
    Separate debug info support disabled.
    Symbol visibility control enabled.
    I read on the Internet that the directory /usr/include have to contain .h files.
    But I don't have the directory include in usr.
    So, I took .h files (standard library) and copied them in /usr/include
    Some errors disappear, but others stay like Carbon.h and CoreFoundation. Maybe I had not copied them in the right directory ?
    How can I update dev tools ?

  12. #12
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [Mac] Compile Qt

    looks like your dev environment isn't complete. Try compiling a simple program (non-qt) on command line to see if that works and to make sure that xcode has been installed correctly.

    try installing xcode from the mac website.

  13. The following user says thank you to schnitzel for this useful post:

    Tibo6 (3rd December 2009)

  14. #13
    Join Date
    Dec 2009
    Posts
    7
    Thanks
    1

    Default Re: [Mac] Compile Qt

    I install xCode from the Mac website. But it had not resolve my problem... because the problem was me
    In fact, when I installed xCode the first time, I unchecked an option which seemed useless to me... apparently no.
    So, now it works.

    Many thanks for you help !

Similar Threads

  1. Replies: 0
    Last Post: 23rd November 2009, 09:48
  2. how to compile c++ source file in qtCreator
    By orky7 in forum General Programming
    Replies: 6
    Last Post: 20th March 2009, 06:45
  3. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  4. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  5. Qt-4.2.2 qmake won't compile under visual studio 2005 on vista
    By moowy in forum Installation and Deployment
    Replies: 7
    Last Post: 13th January 2007, 21:06

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.