PDA

View Full Version : Eclipse, Moc Files, Custom Build Steps



gmat4321
20th August 2008, 17:07
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
2478

jacek
21st August 2008, 16:27
Do you use Qt Eclipse integration module? It should handle moc and uic.

gmat4321
21st August 2008, 18:40
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'.

jacek
21st August 2008, 19:10
Then maybe you should switch to CMake? It can perform out-of-source builds and has some Eclipse integration plugin too.

Arifa
6th August 2010, 05:25
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