Qt World Summit: Register Today!

[SOLVED] Mac/Win: Errors when building a simple project, right after installing a fresh copy of Qt SDK

  • Hello,

    First of all, I am new to Qt. Therefore, I installed everything by running QtSDK 1.2.1. I read this would be the best choice for those who just wanted to get started. I am trying to make an application in Mac OS X 10.6.8 and windows. To get started, I made a test project with this source file:
    @#include <QtGui>

    int main(int argc, char* argv[]) {
    QApplication app(argc, argv);
    QPushButton* button = new QPushButton("Hello_word");
    return app.exec();

    The problem is that I cannot make it run. When I try to compile the project in Mac OS X 10.6.8 I get this error:
    @ld: warning: directory '/usr/local/pgsql/lib' following -L not found
    ld: warning: directory '/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib' following -L not found
    ld: warning: directory '/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib' following -F not found@

    I though I could try with qmake -spec macx-g++ followed by make but I it causes the same errors. If the QtSDK have been installed successfully, how is it possible there are missing directories? Can someone help me please? I am quite new to Mac and even more newbie to Qt.

    Thank you

    PS. I have also plenty of errors when I try to build the same application in windows 7 64bit. In both versions I have installed Qt SDK 1.2.1.

  • I really cannot handle this. Can someone please guide me and suggest where I could look for the answer, at least?

  • welcome to devnet

    I do not know anything about Mac, so I might be of little. Did you check the availability of the directories?

    I am working on windows and have installed lately SDK 1.2.1. So I am wondering what issues you might have there.
    What are the error messages on Windows?
    Do you have also a compiler installed? MinGW is probably easier to start with.

  • Hi Koahnig,

    Thanks for your answer. There is another thread I've opened in one of the other forums where I have explained the issues in windows 7 64bit. It is in "QtCentre forum":http://www.qtcentre.org/threads/50240-I-cannot-compile-project-from-command-line?p=225729#post225729

    I've got an answer that I have mixed the MSVC compiler with MinGW one. I didn't exactly know how to get it worked but I started digging in QtCreator's options. I managed to build a .exe file that works in Windows after changing a few things. I have found two places where I think I could configure QtCreator to work with the newest MinGW 4.7.x. I added two items as follows:

    I don't know if this makes any effect in building projects, though. I also found in the main window that I could change the compiler to build the project. After changing it to MinGW I made the .exe file works. I don't know however if I actually utilize the newest version of MinGW (4.7.x) or the one installed with QtSDK (4.4.x).

    Could you help me with that please?

    Below, there is the screenshot of how I changed the compiler:
    !http://zebik.republika.pl/F/main.jpg(Main window)!

    I hope it gives some light on what I did.

    Best regards

Log in to reply