Results 1 to 5 of 5

Thread: Trying to "Hello World" from Qt + VC7 .Net 2003

  1. #1
    Join Date
    Jun 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Trying to "Hello World" from Qt + VC7 .Net 2003

    I installed Qt for windows from the latest download available at Trolltech. I have VC7 2003 .NET installed on my PC. I ran the configuration with the appropriate path settings and

    QMAKESPEC=win32-mscv2003

    configure.exe -release -no-dsp -vcproj

    Then I tried to compile

    #include <qapplication.h>
    #include <qpushbutton.h>


    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    QPushButton hello("Hello world!");

    hello.show();
    return app.exec();
    }


    by doing

    qmake -project
    qmake
    nmake

    Compile happens w/o error, but I get the following linker message:

    LNK1182: cannot open input file 'c:\qt\2009.02\qt\lib\qtmain

    Clearly I didn't configure my Qt correctly for .NET 2003. Can anybody provide me the correct configuration sequence for what I'm trying to do? Thanks.

    Karl

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Trying to "Hello World" from Qt + VC7 .Net 2003

    Instead of
    Quote Originally Posted by kahahn View Post
    #include <qapplication.h>
    #include <qpushbutton.h>
    try
    Qt Code:
    1. #include <QApplication>
    2. #include <QPushButton>
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trying to "Hello World" from Qt + VC7 .Net 2003

    Did You rebuild Qt qith Visual C++ ?

  4. #4
    Join Date
    Jun 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Trying to "Hello World" from Qt + VC7 .Net 2003

    Thank you for the suggestions. I tried using

    #include <qapplication>
    #include <qpushbutton>


    ... that is, getting rid of the ".h". I got the same result.

    Originally when I did the "configure.exe ..." I ran the following setup.bat file first:

    path=C:\WINNT\system32;C:\WINNT;\C:\WINNT\System32 \Wbem;C:\Program Files\Common Files\GTK\2.0\bin\C:\CARIS\EASY-ENC\Bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;C:\Qt\2009.02\qt\bin
    set QMAKESPEC=win32-msvc2003
    vcvars32


    When I show the path after doing this, it shows a bunch of paths into the MS .NET 2003 installation, including the correct path for the correct c++ compiler.

    The configure process ran about 2 hours and completed without error.

    I suspect there is another operation I need to do to build the missing library, but I don't know what the command line is for that. So I am still in search of a clue.

    Karl

  5. #5
    Join Date
    Jun 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Trying to "Hello World" from Qt + VC7 .Net 2003

    I finally got it to work. I had to re-install on an XP PC (the one I was trying where the library was missing was Windows 2000). When I tried a reinstall on Windows 2000, I found that the library build was not completing -- it was encountering a quota problem.

    So I'm in business now. Just wish it hadn't taken several days when I could have been developing my app.

    Karl

Similar Threads

  1. Qt configure with msvc.net
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 11th June 2007, 08:17
  2. Replies: 2
    Last Post: 3rd April 2007, 19:47
  3. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  4. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41
  5. Setting up qmake to run "Hello World"
    By Rolsch in forum Newbie
    Replies: 2
    Last Post: 27th May 2006, 02:37

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.