So I have a crazy project setup (well, it's only 1 file that needs this crazyness). First, I'll explain the setup.

So I have a file on my dropbox. I want to include that file in a Kdevelop project, but the rest of the project source code is located on a virtual machine, as well as the Kdevelop environment itself where I'm working.

So what I've done is in the project directory tree for the kdevelop project, I've put a symlink to the file in my dropbox. To summarize.

host:~$ ls Dropbox/  

vm:~$ mount  
Dropbox on /home/user/Dropbox/ type vboxsf (uid=1000,gid=1000,rw)

vm:~$ ls Dropbox/  

vm:~/projectroot/modules$ ls -la
pxaregsmodule.c -> /home/dknapp/Dropbox/pxaregsmodule.c

vm:~/projectroot/modules$ cat ../.kdev_include_paths

So as you can see. I have a symlink in a subdirectory of kdevelop that's linked outside of the project tree. And I have an include directory at the project root for my include files.

Now the problem is that when I open pxaregsmodule.c in the kdevelop editor, it doesn't recognize the custom include arguments because it thinks it's opening in /home/user/Dropbox. Of course this only affects the editor, where it can't code complete and it thinks it's missing include files. But doesn't have to do with the makefile and compilation.

But is there any way to make kdevelop not dereference symbolic links and think the file is opening in projectroot/modules so it can see the include path? I can't use a hardlink because the file is on my shared partition, which crosses partition boundaries.

Any solutions? Was that clear?

  • Starting a bounty, because, why not? =P – Falmarri Jun 22 '11 at 18:20

In the VM, is the pxaregsmodule.c at /home/user/Dropbox/pxaregsmodule.c or /home/dknapp/Dropbox/pxaregsmodule.c?

It seems to me like the symbolic link pxaregsmodule.c in /projectroot/modules is broken since it points to the wrong directory. What happens if you:

tail ~/projectroot/modules/pxaregsmodule.c

Does any code show up?

If this is the problem, you can fix it this way:

cd ~/projectroot/modules/
rm pxaregsmodule.c
ln -s /home/user/Dropbox/pxaregsmodule.c

(Not using ln -sf, for clarity)

In any case, I would highly recommend using a modern VCS like Mercurial or Git instead, if possible. They will avoid these types of problems, and if you pay for hosting, you get a solution that's accessible from everywhere, with good backup and security. It's also possible to set up your own server, or even put the repository directly in Dropbox and access it from the vm over network on the computer in question, though I would not recommend the latter.

  • The CODE opens fine. I can read the document, and it works just fine. But KDevelop thinks it's at the location the symlink points to, not the location where the symlink is. This is probably just how kdevelop is written. – Falmarri Jun 28 '11 at 21:32
  • If that is the case, you can avoid this problem by avoiding the combination of KDevelop and symlinks. Stop using either one and your problem should disappear. – Alexander Jun 29 '11 at 14:06
  • So you're saying since it hurts to breathe, I should stop breaking? =P +1 for trying though =] – Falmarri Jul 7 '11 at 18:01
  • I didn't get the meaning of "breaking" in "So you're saying since it hurts to breathe, I should stop breaking?", but avoiding symlinks is not an unreasonable solution. Use Git or Mercurial instead. – Alexander Jul 7 '11 at 23:02
  • I meant breathing =\ – Falmarri Jul 11 '11 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.