Results 1 to 10 of 10

Thread: QT/Win 4.1.1 with VisualStudio2005 Newbie

  1. #1
    Join Date
    Mar 2006
    Location
    Irvine, CA
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QT/Win 4.1.1 with VisualStudio2005 Newbie

    I am a total newbie. Today I installed:

    Visual Studio 2005 Standard Edition
    Qt 4.1.1 (qt-win-commercial-4.1.1-vs2003)
    Visual Studio Integration (qt-vsintegration-1.1.1)

    Since the installation instructions on the Trolltech website started off saying to change the license filename to ".qt-license" (which makes no sense to me in a windows environment), I ignored all the installation notes and just let the installer wizards chun away.

    Things seemed to go pretty well. I found the path environment variables setup automatically even though I was supposed to manually set it, the license filename unchanged seems ok, etc.

    So I happily launched Visual Studio, and was greeted with lots of Qt help, and a nice introductory tutorial project called "addressbook". Yeay! Created the "addressbook" project as instructed. Yeay! But it does not compile. Rats! Output window shows the following:

    Moc'ing addressbook.h...
    Uic'ing addressbook.ui...
    Compiling...
    moc_addressbook.cpp
    c1xx : fatal error C1083: Cannot open source file: '.\GeneratedFiles\debug\moc_addressbook.cpp': No such file or directory
    main.cpp
    d:\workdirs\visualstudio\projects\addressbook\addr essbook\addressbook.h(5) : fatal error C1083: Cannot open include file: 'ui_addressbook.h': No such file or directory
    addressbook.cpp
    d:\workdirs\visualstudio\projects\addressbook\addr essbook\addressbook.h(5) : fatal error C1083: Cannot open include file: 'ui_addressbook.h': No such file or directory
    Generating Code...

    I attach the entire build log as a text file for more info. Any advice to a newbie trying to get started? Seems like "moc.exe" never generated "moc_addressbook.cpp'" for reasons I assume to be related to environment variables or directory settings.

    Steve
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    Problem witn failed path
    fatal error C1083: Cannot open source file: '.\GeneratedFiles\debug\moc_addressbook.cpp': No such file or directory
    Look in properties of your *.ui files
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Mar 2006
    Location
    Irvine, CA
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    thanks zlatko for your suggestion.

    I looked at the properties for addressbook.ui, and it seems in order (as far as I can tell). I think its worse than just a bad reference to a valid file-- there was no file generated at all. moc_addressbook.cpp was not generated, nor was ui_addressbook generated.

    If I run moc.exe from the command line, I get this error:

    "This application has failed to start because MSVCP71D.dll was not found. Re-installing the application may fix this problem."

    I may be chasing shadows, but I think that's the problem. The ui_ and moc_ files were never generated because the apps that are supposed to create them never get started.

    But how to get MSVCP71D.dll, or who was supposed to install it, is a mystery to me.

    Steve

  4. #4
    Join Date
    Mar 2006
    Location
    Irvine, CA
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    I am optimistic I solved my problem.

    I got Qt working by adding some missing dll's to the Qt bin directory. I figured out that when I manually run moc.exe or uic.exe from the command line, I get an errors from windows saying it's missing MSVCP71D.dll and MSVCR71D.dll. So taking this as a clue, I manually downloaded these dll's from some Google'd site and now Qt seems happy.

    http://www.dll-files.com/dllindex/dl...shtml?msvcp71d
    http://www.dll-files.com/dllindex/dl...shtml?msvcr71d

    So looks like I broke through the wall. I am at a loss for what I did, or why this works, but onward and upward!

    If anyone is listening, I would be interested to learn the results of you searching for these dll's on your hard drives, and see if/where they are in your system. But hopefully this dll hell is behind me and knowing where they are supposed to go is an academic issue.

    Steve

  5. #5
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    Those files should be a part of Visual Studio 2005. Sounds like when you installed VS2005 you didn't have it automatically set the environment variables for you. Without them the system can't find the libraries.

  6. #6
    Join Date
    Mar 2006
    Location
    Irvine, CA
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    I agree they should be part of Visual Studio 2005.

    But after installing Visual Studio 2005 fresh from the box, the dll's did not exist anywhere on my hard drive. It is not an issue of setting the correct environment variables-- the dll's Qt moc.exe and uic.exe require are physically not present after a fresh Visual Studio 2005 installation.

    The Visual Studio installer does not give any option for setting environment variables. The installation process is a highly automated procedure.

    My only guess is I purchased the academic version of Visual Studio 2005, which may be denuded by Microsoft for economic reasons. Trolltech may assume everybody has the full blown enterprise architect superhero dotwhizbang version. Also, perhaps the educational version of Qt I got licensed for is strange (moc and uic would require debug versions of these dlls?). I am only guessing.

    Steve

  7. #7
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    It sounds like you have a horribly broken Visual Studio. Your missing files are *required* for most VC++ programs. Maybe you have a VB or .NET only version?

    You set environment variables in Windows in the control panel (somewhere) and not in Visual Studio.

    Anyway, since it doesn't sound like you're using Qt commercially, have you considered the free Open Source version? It comes with the free MingW (gcc) compiler. Supply a text editor (like xemacs, nano, vim, etc), and you have all the tools you need.

  8. #8
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    msvcrt71d.dll is *not* from msvc2005 but from msvc2003.net (msvc2005 has msvcrt80d.dll)
    You build your moc.exe with msvc2003.net in debug mode (don't know how you did this). Rebuild your qt-lib with msvc2005 and it should work fine.

  9. The following user says thank you to ChristianEhrlicher for this useful post:

    skaiser (24th March 2006)

  10. #9
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    My pardons.

  11. #10
    Join Date
    Mar 2006
    Location
    Irvine, CA
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile Re: QT/Win 4.1.1 with VisualStudio2005 Newbie

    Thanks Christian for a mighty helpful post! Man the light bulbs came on.

    I never built moc.exe-- it came with the Qt installation. So now things are clearer-- Trolltech's qt-win-commercial-4.1.1 installer comes with pre-built binaries, and Trolltech built them with .NET 2003 in debug mode.

    This makes sense, since the installer file is named "qt-win-commercial-4.1.1-vs2003.exe". heheh. As a newbie, I failed to recognize the subtle difference and what that meant for VS 2005.

    Also, one installer doc does say that I am supposed to configure and build the package first with nmake. So as you suggest, I guess I should figure out how to do that and see what happens.

    Thanks Brandybuck for chiming in. I have considered the Open Source version, but I'm very keen to get the VisualStudio integration thing happening. If it doesn't work right, then I'll drop back to the Open Source and probably try a KDE / KDevelop environment. Got a big project ahead and want to get the best tools I can up front here before settling in.

    Steve

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.