Compiling for a remote host [message #121463] |
Thu, 23 September 2004 06:36  |
Eclipse User |
|
|
|
Hi,
I add the same problem.
I solved it by changing the default command that appears in Properties
dialog ->C/C++ Make Project option->Make Builder tab.
In the Build command panel uncheck the Use default option and in the Build
command field add your command (I created an external tool for compilation
and ran it from there, but you can run a remote command like : rsh
hostname make)
|
|
|
|
|
Re: Compiling for a remote host [message #121996 is a reply to message #121623] |
Tue, 28 September 2004 14:04  |
Eclipse User |
|
|
|
Originally posted by: ravi_kohli2000.yahoo.com
Thanks alot ! I'm able to build code remotely using ssh, etc. now.
I am still usure how am I supposed to use Eclipse features if I do it like
this.
I have access to a CVS server for the .C files. If I "cd" to the source code
on the remote machine like this (via a Make commandline in Eclipse), Eclipse
is
not using the files I have just retrieved from CVS (in the C/C++ project).
It's using files
(that I also saved on a remote server dir) to build. I had wanted to use the
files in the the
Navigator to build,etc so that I can use the editor and run the debugger on
the PC. Can
you pls clarify that setup too ?
Thanks in advance.
"kesselhaus" <kesselhaus@gmx.net> wrote in message
news:cj58dg$ms1$1@eclipse.org...
> You need to change into your remote project directory and do the make
> from there. Sure the tools should be the one available to the remote
> machine.
>
> Though,
> ssh <remotehost> cd <projectdir> && make
>
> Since the makefile is executed by the remote make, 'rm -rf' is
> sufficient as long as it is in the remote's path.
>
> Best is to do the macro expansion thing
>
> RM = rm -rf
>
> clean:
> $(RM) $(OBJECTS) $(TARGET)
>
>
>
> ravi schrieb:
> > I've set up "C/C++ Make Project" to "ssh remotehost /path/make". Looks
like
> > it
> > successfully runs the "make" command remotely now since I get a resp
> > on the console. I've not completed the remote build as yet. I get an
error
> > :
> > "make: Fatal error: Don't know how to make target `clean'
> > My makefile maybe wrong(?). Is it because I need to specify "remote"
> > commands
> > e.g. for "clean" (below that uses "rm", should be ssh or (??) ? You
> > mentioned a tool
> > for compiling. I'm not sure if you mean you replace the "make" command
in
> > the
> > "C/C++ Make Project" option.
> >
> > I'm using a simple "Makefile" in the Eclipse project that looks like:
> > %.o: %.cpp
> > $(CC) $(CFLAGS) -c $<
> > CC = g++
> > LD = ld
> > CFLAGS = $(INCLUDE) $(DEFINES) $(DEBUG)
> > DEBUG = -g -Wall
> > DEFINES = -D"somedef"
> > INCLUDE = -I. -I"someinc"
> > LDFLAGS = -L"someflags"
> > LIBS = -l"somelibs"
> > all: test
> > test: main.o pgm.o
> > $(CC) $(LDFLAGS) -o test main.o pgm.o $(LIBS)
> > clean:
> > rm -f test main.o pgm.o
> >
> > Can you explain what's wrong with the way I'm remote compiling from
> > my PC ?
> >
> > Thanks in advance.
> >
> >
> >
> > "Guy" <guy.Milman@comverse.com> wrote in message
> > news:ciu8vk$e43$1@eclipse.org...
> >
> >>Hi,
> >>I add the same problem.
> >>I solved it by changing the default command that appears in Properties
> >>dialog ->C/C++ Make Project option->Make Builder tab.
> >>In the Build command panel uncheck the Use default option and in the
Build
> >>command field add your command (I created an external tool for
compilation
> >>and ran it from there, but you can run a remote command like : rsh
> >>hostname make)
> >>
> >
> > "Guy" <guy.Milman@comverse.com> wrote in message
> > news:ciu8vk$e43$1@eclipse.org...
> >
> >>Hi,
> >>I add the same problem.
> >>I solved it by changing the default command that appears in Properties
> >>dialog ->C/C++ Make Project option->Make Builder tab.
> >>In the Build command panel uncheck the Use default option and in the
Build
> >>command field add your command (I created an external tool for
compilation
> >>and ran it from there, but you can run a remote command like : rsh
> >>hostname make)
> >>
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.03312 seconds