Version: (using KDE 4.3.4) Compiler: gcc-4.3 OS: Linux Installed from: Gentoo Packages The test program I'm about to attach shows the problem. I have a variable: Eigen::Vector3d myVec; Vector3d is not recognized and therefore I don't get code completion. When I add using namespace Eigen; and declare the Vector3d without Eigen::, it works
Created attachment 38785 [details] Illustrates the problem with the missing code completion for vec, while the one for vec2 is working
It would be very helpful if you could reduce the problem to a minimal example, eg. without includes, and with everything removed that is not related to the problem. You could for example run the file the the preprocessor "cpp" and then reduce the output.
Okay, it's not that simple. The simplest version I could come up with is the following: #include <eigen2/Eigen/Core> int main(int argc, char **argv) { Eigen::Vector3d vec; return 0; } I tried running the preprocessor on the file, but then the problem does not show up. (I also tried to create a dummy matrix class and then a Vector3d typedef for it, but that didn't bring up the issue either. So it must be something specific to Eigen
I think it would be more helpful if you could move the Vector definition instead of the include file and remove the parts you don't need, so that it's autocontained (we don't need to check in eigen).
I'm not quite sure what you're asking for (Moving the vec declaration or the Vector3d definition?), so I just copied all of eigen and I'll strip it down to a minimal set. I just made an interesting discovery that should help a lot when finding the bug: I just modified the example above to this: int main(int argc, char **argv) { Eigen::Vector3d vec; Vector3d vec2; return 0; } And kdevelop recognized vec2 even though I don't have a 'using namespace Eigen' as part of my file. So just as a quick shot, it seems that these definitions (may be even all of eigen?) were not recognized to be part of Eigen. I then did a quick check and saw that in Matrix.h (which is where Vector3d is defined), there is _no_ namespace Eigen { ... }, but it is in the file which includes matrix.h (need to check, but I think that is Eigen/Core). That would also explain why running the preprocessor on the file gets rid of the issue. I'll now try to produce a minimal 3-file test to see whether I'm right
Created attachment 38866 [details] Main File which shows the problem - needs the Definitions.h file which I'll shortly attach
Created attachment 38867 [details] Definitions file
Yes this is confirmed. If a header file is included as namespace NameSpace { #include "someFile.h" } The definitions of someFile.h are not put into the namespace NameSpace
Argh.. that's an enormously ugly thing to do ;-)
Ping... I would give 50 votes for that bug, but I think you got the point :) Is there any way I can help on this one? For me this bug is one of the most critical to me...
Still happens in kdevelop 3.10.2/kdevplatform 0.10.2.
openmpi breaks due to the same limitation in kdevelop...
*** Bug 272465 has been marked as a duplicate of this bug. ***
*** Bug 274429 has been marked as a duplicate of this bug. ***
Hello! We are working on a new clang-based C/C++ language plugin for KDevelop 5 which supersedes the old C++ plugin in KDevelop 4. See e.g.: https://www.kdevelop.org/news/first-beta-release-kdevelop-500-available Due to a lack of manpower, we cannot fix bugs in the old C++ plugin. We rather want to supply a good Clang based C++ experience for KDevelop 5 than wasting our time on the legacy C++ support for KDevelop 4. With the new clang-based C/C++ language plugin, the bug presented here does not occur. In my testing. For these reasons, I'll close this bug. Please stay tuned for KDevelop 5. If you think this bug is applicable to Clang/KDevelop 5, please reopen the report and add new information on how to reproduce the bug there. Sorry for the inconvenience, I hope you understand the reasoning above. Cheers