[Qt-creator] file not found for mounted drive
mirzadeh at gmail.com
Fri Oct 3 01:51:47 CEST 2014
I have to work with remote files on a server that has its own toolchain.
As a result I have configured the project on the server, having its own
.pro and Makefile.
I'd like to be able to edit and build them remotely on my machine. The
trick i have played here is mounted the server through sshfs and create a
local dummy project that reads the file on the mounted server. To enable
remote building I have created a custom build target like this:
remote_build.target = remote_build
remote_build.commands = ssh server "make -C $$REMOTE_BUILD_DIR"
QMAKE_EXTRA_TARGETS += remote_build
this does build the project fine. However, I am not able to use QtCreator
to jump to errors warnings etc since all the error messages have relative
path on the server. I tried to go around this by the following hack:
remote_build.commands = ssh server "make -C $$REMOTE_BUILD_DIR 2>stderr
1>stdout; sed -i 's/server_path/locally_mounted_path/g' stderr stdout; cat
stdout; cat stderr 1>&2"
Now when I build, the error messages do point to the file which is mounted
locally and is open in the editor window. However, QtCreator still cannot
jump to the file, complaining that it does not exist.
Is what i'm trying to do even feasible? is there any better way of
achieving this? I would really LOVE if Qt Creator had a built-in way of
building remote targets.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator