Results 1 to 5 of 5

Thread: Eclipse, Moc Files, Custom Build Steps

  1. #1
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Eclipse, Moc Files, Custom Build Steps

    I am unable to get Eclipse to create MOC files through the IDE.

    For a Header I've edited the Properties ... Resource Custom Build Step.
    If I fill in just the 'Command' string the custom build step never fires.
    If I fill in the 'Output file name(s)' with the xxx_moc.cpp file to be created I get a build error becuause the make file wants to compile the source before it is created from the header.

    I'm setting up Eclipse the same way I setup Visual Studio 2008. In visual studio it worked as expected.

    What silly thing have I done wrong??

    Attached is a screen shot of my Custom Build Step
    Picture 1.png

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eclipse, Moc Files, Custom Build Steps

    Do you use Qt Eclipse integration module? It should handle moc and uic.

  3. #3
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Eclipse, Moc Files, Custom Build Steps

    QT/Eclipse integration is not available on the Mac. (yet)

    ...anyway the solution is to fill in the "Output file name(s)" with the name of the moc file, but make sure to point the moc file to the same location as the header. I was hoping to avoid this to keep the project 'clean'.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eclipse, Moc Files, Custom Build Steps

    Then maybe you should switch to CMake? It can perform out-of-source builds and has some Eclipse integration plugin too.

  5. #5
    Join Date
    Aug 2010
    Location
    India
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Maemo/MeeGo

    Default Re: Eclipse, Moc Files, Custom Build Steps

    I have used the same setup and the moc file is being generated.But my program crashes at connect statement.


    code:
    QUrl url;
    url.setUrl(".......");
    url.addEncodedQueryItem("hl", "en");
    QNetworkAccessManager *manager = new QNetworkAccessManager(this);
    connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleNetworkData(QNetworkReply*)));
    manager->get(QNetworkRequest(url));


    backtrace:

    bt full
    #0 0x004d7832 in ?? () from /lib/ld-linux.so.2
    No symbol table info available.
    #1 0x00ccaba6 in poll () from /lib/tls/i686/cmov/libc.so.6
    No symbol table info available.
    #2 0x006a854b in g_poll () from /lib/libglib-2.0.so.0
    No symbol table info available.
    #3 0x0147bb92 in Java_org_eclipse_swt_internal_gtk_OS_Call(int0_t, int0_t) ()
    from /home/pradeep/Downloads/eclipse/configuration/org.eclipse.osgi/bundles/203/1/.cp/libswt-pi-gtk-3650.so
    No symbol table info available.
    #4 0xb594e4d4 in ?? ()
    No symbol table info available.
    #5 0xb594a714 in ?? ()
    No symbol table info available.
    #6 0xb5a53000 in ?? ()
    No symbol table info available.
    #7 0xb5abdb24 in ?? ()
    No symbol table info available.
    #8 0xb552efc0 in ?? ()
    No symbol table info available.
    #9 0xb552eea9 in ?? ()
    No symbol table info available.
    #10 0xb552eea9 in ?? ()
    No symbol table info available.
    #11 0xb552f4a9 in ?? ()
    No symbol table info available.
    #12 0xb552efcd in ?? ()
    No symbol table info available.
    #13 0xb552eea9 in ?? ()
    No symbol table info available.
    #14 0xb552eea9 in ?? ()
    No symbol table info available.
    #15 0xb552f343 in ?? ()
    No symbol table info available.
    #16 0xb552f343 in ?? ()
    No symbol table info available.
    #17 0xb552ee67 in ?? ()
    ---Type <return> to continue, or q <return> to quit---return
    No symbol table info available.
    #18 0xb552ee67 in ?? ()
    No symbol table info available.
    #19 0xb552ee67 in ?? ()
    No symbol table info available.
    #20 0xb552c2cc in ?? ()
    No symbol table info available.
    #21 0x0758a840 in JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) ()
    from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/../lib/i386/client/libjvm.so
    No symbol table info available.
    #22 0x076b0298 in os:s_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*) ()
    from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/../lib/i386/client/libjvm.so
    No symbol table info available.
    #23 0x0758a69f in JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) () from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/../lib/i386/client/libjvm.so
    No symbol table info available.
    #24 0x076dd2db in Reflection::invoke(instanceKlassHandle, methodHandle, Handle, bool, objArrayHandle, BasicType, objArrayHandle, bool, Thread*) ()
    from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/../lib/i386/client/libjvm.so
    No symbol table info available.
    #25 0x076e0241 in Reflection::invoke_method(oopDesc*, Handle, objArrayHandle, Thread*) () from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/../lib/i386/client/libjvm.so
    No symbol table info available.
    #26 0x076065cf in JVM_InvokeMethod () from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/../lib/i386/client/libjvm.so
    No symbol table info available.
    #27 0x00eba314 in Java_sun_reflect_NativeMethodAccessorImpl_invoke0 () from /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libjava.so
    No symbol table info available.
    #28 0xb553605d in ?? ()
    No symbol table info available.
    #29 0xb552ee67 in ?? ()
    No symbol table info available.
    #30 0xb552ee67 in ?? ()
    No symbol table info available.
    #31 0xb552f343 in ?? ()
    No symbol table info available.
    #32 0xb552ee67 in ?? ()
    No symbol table info available.
    Cannot access memory at address 0xbf862638


    I am calling qt code from my XPCOM component

Similar Threads

  1. Howto use Eclipse with QT4 in 10 steps
    By the_bis in forum Newbie
    Replies: 3
    Last Post: 28th January 2007, 20:21

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.