You are not logged in.

#1 2015-02-21 12:38:01

whoops
Member
Registered: 2009-03-19
Posts: 891

[solved] Kdevelop sometimes can't find libraries without longer path

Hi!

I don't understand what's happening... most likely I'm missing some basic knowledge here to understand what kdevelop is doing ("wrong") and why: everything works fine on a compiler (cmake, gcc) lvl, but on an IDE / desktop application lvl:

Sometimes kdevelop can find stuff just fine. One example (happens with many, seemingly random libs):

#include <chrono>

works both for compiling and in kdevelop (completion etc).

Then, in a different header it says that it can't find (p.E.: <chrono> / <atomic> / <QtWidgets/QLabel>, red line under the include, no syntax completion, etc). Still compiles/runs without any problems for some reason, so I'm guessing cmake doesn't have the same problems (even after deleting the build directory). Kdevelop suggests using:

#include <c++/4.9.2/chrono>

... instead, which probably isn't such a great thing, even though it works at the moment.


So far I tried:
( TL;DR: Nothing useful, probably? )
- Staring at (include)-PATHy looking settings in different places (kde settings, kdevelop preferences, bash, zsh, /etc/profile/dontrememberwhere)
- Looking at random parts of the manuals from "ld", "lib" and "elf".
- Browsing some "c++ for beginners" resources, looking for "4.9.2"
- Adding "-std=c++14" to random places. Also QT lib stuff.
- Switched off ccache. No difference.
- Removing some of the red underlined includes to see if it does compile without them (aaand the answer is: sometimes. Mostly not.)
- Changing / removing the Automoc properties in cmake lists to try & make it give me the same errors as kdevelop does (faild').
- recompiling qt and kdevelop with debug symbols for some reason (that ran the whole night -.-)
- Moving my header files from one library to a different one and back for no reason other than that the problem didn't seem to occur in the main file / the executable target at first but then later it did.
- Clicking the compile button, clean button and restarting Kdevelop repeatedly while softly but sternly whispering "work!" into my monitor's speakers.

Aaaand now I'm starting to get the feeling that I might be slightly off track with my search for a solution :3

So: Any hints? thx!

Last edited by whoops (2015-03-03 20:01:48)

Offline

#2 2015-02-27 00:11:28

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

Re: [solved] Kdevelop sometimes can't find libraries without longer path

I'm completely making a wild guess here, but IDEs which have the notion of projects, need you to have a header as part of the project before it will be parsed and understood by the IDE. Are the headers which show the squigglies added to your project?

Offline

#3 2015-03-03 20:01:15

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [solved] Kdevelop sometimes can't find libraries without longer path

As far as I can tell, Kdevelop works with blacklisting here - unless excluded, all files are considered part of the project.

The problem disappeared after some "spring cleaning" though. Don't know what exactly did the trick, but probably one of those:
- Eliminated the causes of some compile / dependency errors that only occurred while BUILD_SHARED_LIBS was set to "OFF" (I usually leave it on, unless I want to do profiling)
- Got rid of all uses of AUX_SOURCE_DIRECTORY, listing all source files manually instead
- Moved the cmake instructions for all the libraries that were part of the project from subdirectory cmakelists to one monolithic cmakelist

Offline

Board footer

Powered by FluxBB