List Info

Thread: Cannot create .moc files




Cannot create .moc files
country flaguser name
United States
2007-07-16 07:19:51
Hi all!

I started  learn about Qt4 and KDE4 and try to write my
first app in KDE4.
Currently I have problems with creating .moc files.  For
some reason .o
files were
created successfully, but .moc were not created. I put
kde4_automoc() in the
CMakeLists.txt
but it doesn't work also. When I try to add #include
"foo.moc" in the .cpp
files the compiler complains
that it can't find "foo.moc" .

Can you please help me with this problem?

Thanks you
-- 
View this message in context: http://www.nabble.com/Cannot-create-.moc-
files-tf4086307.html#a11614207
Sent from the kde-devel mailing list archive at Nabble.com.

 
>> Visit 
http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
unsubscribe <<

Re: Cannot create .moc files
user name
2007-07-16 14:13:19
2007/7/16, alexandrm <alexandrm77gmail.com>:
>
> Hi all!
>
> I started  learn about Qt4 and KDE4 and try to write my
first app in KDE4.
> Currently I have problems with creating .moc files. 
For some reason .o
> files were
> created successfully, but .moc were not created. I put
kde4_automoc() in the
> CMakeLists.txt
> but it doesn't work also. When I try to add #include
"foo.moc" in the .cpp
> files the compiler complains
> that it can't find "foo.moc" .

kde4_automoc isn't needed anymore. I guess you forgot to add
Q_OBJECT
macro in class declaration.
 
>> Visit 
http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
unsubscribe <<

Re: Cannot create .moc files
user name
2007-07-16 18:56:40
Hi!

I had the same problem. I solved it by adding:
include_directories(${CMAKE_CURRENT_BINARY_DIR})
to CMakeList.txt. Don't forget to add #include "foo.moc" in your foo.cpp.You don't need KDE4_AUTOMOC anymore.

I hope this helps.

Elio.

2007/7/16, alexandrm < alexandrm77gmail.com">alexandrm77gmail.com>:

Hi all!

I started&nbsp; learn about Qt4 and KDE4 and try to write my first app in KDE4.
Currently I have problems with creating .moc files.&nbsp; For some reason .o
files were
created successfully, but .moc were not created. I put kde4_automoc() in the
CMakeLists.txt
but it doesn't work also. When I try to add #include "foo.moc" in the .cpp
files the compiler complains
that it can't find "foo.moc" .

Can you please help me with this problem?

Thanks you
--
View this message in context: http://www.nabble.com/Cannot-create-.moc-files-tf4086307.html#a11614207
Sent from the kde-devel mailing list archive at Nabble.com.


>&gt; Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )