Discussion:
Cross platform KDevelop project files
Markus Mueller
2017-05-07 22:37:01 UTC
Permalink
Hi Team,

I wanted to ask a question about Kdevelop and sent it to Milian and he said i should ask you. His and my email are below. Can anyone suggest me any way to solve it?

Thanks
Markus

Begin forwarded message:

Date: Sun, 07 May 2017 22:57:38 +0200
From: Milian Wolff <***@milianw.de>
To: Markus Mueller <***@yandex.com>
Subject: Re: Cross platform KDevelop project files
Hi Milian,
Hey Markus!
Thanks for the KDevelop project, specifically on windows. I am kinda
windows/visual studio guy but trying to come up with a cross platform
project files. I really appreciate your help on this one.
Thanks,

but I'm the wrong person to ask about Windows stuff, really. Paired with the
fact that I don't have a lot of time for KDevelop recently, I ask you to
please send this mail to our mailing list:

***@kde.org

There, others can chime in and add their experience.

Cheers


===============MY EMAIL======================
I am using Kdevelop 5.1 and cmake project. I am trying to use same source
files to create three projects
windows->visual studio solution
windows->mingw supported Kdevelop solution (is there any way to debug this
via gdb? )
linux->Kdevelop solution
workspace\ (in this folder there should only be sources and git support)
solution1
project1
src files
project2
...
solutions\
vs2015
solution1.sln
kdevelop_linux
solution1.kdev4 (these are two files that that are created when i
import
projects.) .kdev4 folder
build_folder (generated makefiles,cmakecachefiles etc)
cmake_install.cmake
CMakeCache.txt
Makefile...
kdevelop_windows
solution1.kdev4
build_folder
...
builds\
vs2015
project1.exe
project2.dll
kdevelop_linux
project1
project2.so
kdevelop_windows
project1.exe
project2.dll
so my question is this: is there any way to achieve this because Kdevelop
puts .kdev4 folder and solution1.kdev4 to src folder but when i want to
open that project on windows it cant find paths because in solution1.kdev
file it is written "[CMake][CMake Build Directory 0]
Build Directory Path=/mnt/edrv/ws1/x1_build/lin"
?
so practically i would like to separate solutions files and source files.
Because i am going to have tests running on linux and on windows at the
same time and solution has about 40 projects, so renegration or import
would just drive me crazy i guess.
Debugger support: Is there any way to use LLDB or GDB on windows? Is LLDB
supported on linux?
Thanks in advance, i really appreciate any hint you can give me.
Markus Mueller
--
Milian Wolff
***@milianw.de
http://milianw.de
René J.V. Bertin
2017-05-08 08:53:19 UTC
Permalink
Post by Markus Mueller
Hi Team,
I think the proper term is "Community" ... but hi too :)
Post by Markus Mueller
so my question is this: is there any way to achieve this because Kdevelop
puts .kdev4 folder and solution1.kdev4 to src folder but when i want to
open that project on windows it cant find paths because in solution1.kdev
file it is written "[CMake][CMake Build Directory 0]
Build Directory Path=/mnt/edrv/ws1/x1_build/lin"
To my knowledge you're out of luck here. KDevelop wants to store its .kdev4 file and directory in the project root. It can be configured to use a build directory that's on the moon if you have access there, but as you noticed it will always store an absolute path in the .kdev4/foo.kdev4 file.

I don't think there's much chance that KDevelop will get support for storing those .kdev4 entries in a random location, and you learn to put up with their presence. Support for a relative location of the build directory is a different matter: it would certainly make the IDE more versatile for users who access their projects and sessions from multiple machines, and it shouldn't be particularly difficult to replace a part of the *stored* build dir path with a token representing the path to the project dir (or rather, to the project *parent* dir).
Post by Markus Mueller
Because i am going to have tests running on linux and on windows at the
same time and solution has about 40 projects, so renegration or import
would just drive me crazy i guess.
KDevelop does support multiple build directories but only per project, and it will typically re-run CMake each time you change between build directories (which requires opening the project settings dialog). That doesn't sound like a solution if you plan to put all those projects in a single session. (That many projects in a KDevelop session sounds like a recipe for frustration anyway; I'd turn off the "parse entire project when opened" setting if I were you to speed up things a bit.)

An option to change the build directory of all open projects in session would be nice but probably hard to implement unless it's done via some kind of scripting approach.
Post by Markus Mueller
Debugger support: Is there any way to use LLDB or GDB on windows? Is LLDB
supported on linux?
Debugger support should only be platform-specific to the extent that the debugger itself is platform specific. In other words, I don't see any reason why gdb or lldb wouldn't work on MSWin, and yes, lldb can be used on Linux. Last time I tried it it worked pretty well, despite the fact that it uses lldb-mi which isn't the way to get the most out of lldb.
Attaching to a running process will probably NOT work on MSWin though; it requires a library from the Plasma walled-garden collection.

R.
Kevin Funk
2017-05-08 10:02:52 UTC
Permalink
Post by Markus Mueller
Hi Team,
(snip)
Post by Markus Mueller
Debugger support: Is there any way to use LLDB or GDB on windows? Is LLDB
supported on linux?
Just replying on this one:

LLDB is supported on Linux, since 5.1. It uses the lldb-mi binary (which needs
to be available on your system).

Both GDB/LLDB support for KDevelop is not compiled on Windows at this point,
since there are issues compiling the terminal adapter (stty.{h,cpp} in
kdevelop.git) on Windows afair.

Help welcome in that regard -- theoretically both the GDB/LLDB support should
work on Windows, too.

Regards,
Kevin
Debugger support should only be platform-specific to the extent that the
debugger itself is platform specific. In other words, I don't see any
reason why gdb or lldb wouldn't work on MSWin, and yes, lldb can be used on
Linux. Last time I tried it it worked pretty well, despite the fact that it
uses lldb-mi which isn't the way to get the most out of lldb. Attaching to
a running process will probably NOT work on MSWin though; it requires a
library from the Plasma walled-garden collection.
R.
--
Kevin Funk | ***@kde.org | http://kfunk.org
Sven Brauch
2017-05-08 20:22:03 UTC
Permalink
Hi,
so practically i would like to separate solutions files and source files.
Because i am going to have tests running on linux and on windows at the
same time and solution has about 40 projects, so renegration or import
would just drive me crazy i guess.
I think I understood the perceived problem but not the problem itself.
KDevelop doesn't really have "solution" files. You just open a cmake
project by clicking a folder and that's it, right? There is nothing you
need to configure ... assuming it is configured to build properly
beforehand.

Greetings,
Sven

Loading...