Configuring the compiler on Mac OSX



  • I am new to Qt and develop on a Mac - managed to get some of the examples working via XCode but the Qt Creator throws the message below

    :-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

    when I try to compile.

    In the preferences pane there seem to be various autodetect compilers flagged though if I select a sensible one of these it doesn't seem to make any difference.

    Not sure if this means there was something wrong with the Qt install itself - I am using OSX 10.7.5 and Xcode 4.5.2....



  • I think I have now figured out the reason but can't seem to fix it.

    The problem was that I installed a beta of Qt 5.0 before installing the latest official build. The installation crashed - and I then installed the official build instead.

    However in QtCreator it still points to the (defunct) QT5.0 kit. Unfortunately there seems to be no means of adding the real location (/usr/bin/qmake) as the MacFileManager won't let you browse to /usr/bin.

    I found out how to display the /usr/bin in the finder

    (type defaults write com.apple.Finder AppleShowAllFiles TRUE) in a terminal. However while this works fine for finder, it doesn't seem to work for QtCreator - as this cannot see /usr/bin/qmake.

    Is there an equivalent command for Qtcreator.

    Arguably this is a bug.....



  • btw - I managed to install fine on a laptop where I hadn't originally installed a (bad) beta of 5.0. Unfortunately I can't seem to figure out a way to set it up now on my desktop server.

    Does anyone have any ideas - either a command line entry into Qt to set this without the GUI - or a way to make the Qt GUI able to display and browse for /usr/bin



  • I am having the same problem.. Did you by any chance find a fix?



  • not really - I eventually installed the official Qt5.0 and that seemed to work.



  • I am making some progress.. I have only been working on in for about an hour.. But I will let you know when I find something, if you want.



  • I got it... I have compiled a simple text input/output GUI application to test it.

    1. Uninstalled my current version of Qt 5.0.0
    2. Made sure I had the latest version of Xcode installed.
    3. In Xcode go to Preferences -> Downloads -> install command line tools.
    4. Install Qt 5.0.0
    5. I restarted my computer on this step.. I don't know if that is necessary.. but it can't hurt.


  • Thanks, It works.. but i still don't understand



  • I guess these are computers and understanding is something of an optional extra. However I do remember that you need the command line tools for XCode.

    Hope it goes well


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.