<div dir="ltr">Ok! Thanks.</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-19 10:44 GMT+00:00 Milian Wolff <span dir="ltr"><<a href="mailto:mail@milianw.de" target="_blank">mail@milianw.de</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wednesday 19 March 2014 10:20:08 Daniel Alves Paladim wrote:<br>
> Exactly, Milian. I am talking about C++ template.<br>
> For example, I have the following two files,<br>
</div>> *foo.h* (declaration)<br>
<div class="">> template <class T><br>
> class foo {<br>
> foo();<br>
> /*<br>
> Declaration of the methods<br>
> */};<br>
> #include "foo.hpp<br>
><br>
</div>> *foo.hpp* (implementation)<br>
<div class="">> template <class T><br>
> foo<T>::foo)() {}<br>
> /* and so on...*/<br>
><br>
> Now, when I work with this setting, when I am editing foo.hpp, I don't have<br>
> autocomplete anymore, the problems tab is full of errors. Is there no way<br>
> to fix this without modifying foo.h and foo.hpp? Is there a way to give a<br>
> hint to Kdevelop, so that he knows where the declaration of foo is?<br>
<br>
</div>Add an include guard to your foo.h and add a #include "foo.h" to your foo.hpp.<br>
Otherwise there is no way for us to know that foo.hpp depends on foo.h<br>
<br>
Bye<br>
<div class="im HOEnZb"><br>
> 2014-03-19 9:41 GMT+00:00 Milian Wolff <<a href="mailto:mail@milianw.de">mail@milianw.de</a>>:<br>
> > On Wednesday 19 March 2014 02:30:10 Aleix Pol wrote:<br>
> > > On Tue, Mar 18, 2014 at 6:52 PM, Daniel Alves Paladim<br>
> ><br>
> > <<a href="mailto:daalpa@gmail.com">daalpa@gmail.com</a>>wrote:<br>
> > > > Dear all,<br>
> > > ><br>
> > > > KDevelop seems to be unable to "understand" my template class if I<br>
> ><br>
> > divide<br>
> ><br>
> > > > it in 2 files the following way, one file for the class declaration<br>
> > > > and<br>
> > > > another file for the implementation (which is included in the first).<br>
> ><br>
> > This<br>
> ><br>
> > > > difficults working on the implementation file. I wonder if there is<br>
> > > > any<br>
> > > > way<br>
> > > > to solve this problem without having to change the way I organize<br>
> ><br>
> > things.<br>
> ><br>
</div><div class="HOEnZb"><div class="h5">> > > Maybe you should take a look at<br>
> > > kdevelop/file_templates/classes/qobject/.<br>
> > > This one also uses different files.<br>
> ><br>
> > Or are you speaking about C++ template<typename Foo> stuff here? I think<br>
> > so.<br>
> ><br>
> > In that case where does it brake? When editing the ".hpp" file which does<br>
> > not<br>
> > include the ".h" file? Without proper code snippets we are left in the<br>
> > dark -<br>
> > please give us an example code.<br>
> ><br>
> > Bye<br>
> > --<br>
> > Milian Wolff<br>
> > <a href="mailto:mail@milianw.de">mail@milianw.de</a><br>
> > <a href="http://milianw.de" target="_blank">http://milianw.de</a><br>
<br>
--<br>
Milian Wolff<br>
<a href="mailto:mail@milianw.de">mail@milianw.de</a><br>
<a href="http://milianw.de" target="_blank">http://milianw.de</a><br>
_______________________________________________<br>
KDevelop mailing list<br>
<a href="mailto:KDevelop@kde.org">KDevelop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdevelop" target="_blank">https://mail.kde.org/mailman/listinfo/kdevelop</a><br>
</div></div></blockquote></div><br></div>