Results 1 to 4 of 4

Thread: Mocing error with Visual Studio Integration

  1. #1
    Join Date
    Oct 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy Mocing error with Visual Studio Integration

    Hi,

    I’m testing the compilation of a Qt Unix Project on Visual Studio with Qt Visual Studio Integration but I get the following error when mocing…

    standard input(0): Warning: No relevant classes found. No output generated.
    But when I generate moc files in command line, the meta object compiler generates files and I haven’t got any errors…

    My solution is to generate them manually by command line and to add the generated files to the project .

    I'm still looking for a more convenient solution.

    Can somebody help me ?

    Thanks
    anonyme_84

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Mocing error with Visual Studio Integration

    First of all, it's a warning, not an error. The reason for the warning is that there used to be a class with Q_OBJECT macro. A moc rule was created for corresponding file. Now that Q_OBJECT macro has been removed the corresponding moc step is unnecessary (but for some reason did not get properly removed), thus warning message.
    J-P Nurmi

  3. #3
    Join Date
    Oct 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Mocing error with Visual Studio Integration

    Hi,

    I know it’s just a warning but without this generated file I can’t compile my project.

    I don’t understand why moc doesn’t generated files with Visual Studio when files are generated in command line.

    • Visual Studio shows "Warning: No relevant classes found. No output generated."
    • Command line [moc -o moc_myfile.cpp myfile.h] generates a file ( not null )


    Thanks...
    anonyme_84

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Mocing error with Visual Studio Integration

    Does this happen if you clean the project and re-import it from .pro file?
    J-P Nurmi

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. How to uninstall Visual Studio Integration
    By steg90 in forum Installation and Deployment
    Replies: 1
    Last Post: 30th May 2007, 16:16
  3. Visual Studio App Wizard for Qt
    By joshlareau in forum Qt-based Software
    Replies: 4
    Last Post: 9th February 2007, 20:36
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. Qt Designer & Visual Studio 2005
    By pSiCho in forum Qt Tools
    Replies: 6
    Last Post: 9th February 2006, 13:40

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.