I’m a newbie to QNX or Unix like enviroments so I know this is a very simple
thing to do but I’ve not been succesful yet.
Standard redirection seems to not work.
I thought something like “cc myfile.c > compiler.out” would work.
However, compiler.out is just an empty file after the compiler. So what’s
the trick?
Try this,
cc myfile.c 2> compiler.out
Error messages will typically get sent to stderr, aka file descriptor 2.
If the compiler.out is still empty, then your problem is that you have no
compilation errors. Sorry. =)
Cheers,
-Brian
+====================================+
Brian K. Hlady bhlady@qnx.com
OEM Support Rep QSSL
+====================================+
“Chris Rose” <chris.rose@viasat.com> wrote in message
news:9vlcb1$9i1$1@inn.qnx.com…
I’m a newbie to QNX or Unix like enviroments so I know this is a very
simple
thing to do but I’ve not been succesful yet.
Standard redirection seems to not work.
I thought something like “cc myfile.c > compiler.out” would work.
However, compiler.out is just an empty file after the compiler. So what’s
the trick?
“Chris Rose” <chris.rose@viasat.com> wrote in message
news:9vlcb1$9i1$1@inn.qnx.com…
I’m a newbie to QNX or Unix like enviroments so I know this is a very
simple
thing to do but I’ve not been succesful yet.
Standard redirection seems to not work.
I thought something like “cc myfile.c > compiler.out” would work.
However, compiler.out is just an empty file after the compiler. So what’s
the trick?
compiler uses stderr for dumping info. Try:
cc myfile.c 2>compiler.out
make 2>&1 | tee file.err
Actually, vim does it for you.
cheers,
Igor
“Chris Rose” <chris.rose@viasat.com> wrote in message
news:9vlcb1$9i1$1@inn.qnx.com…
I’m a newbie to QNX or Unix like enviroments so I know this is a very
simple
thing to do but I’ve not been succesful yet.
Standard redirection seems to not work.
I thought something like “cc myfile.c > compiler.out” would work.
However, compiler.out is just an empty file after the compiler. So what’s
the trick?
Igor…
If I want to compile directly from vim, do I have to set something up?
In other words, will vim read the common.mk file and such? For example,
in the directory where I have common.mk, I type:
make clean; make install
and things get made, and things get installed. Will vim do likewise,
and if not, how could I set vim up to do likewise?
Thanks…
Miguel.
Igor Levko wrote:
make 2>&1 | tee file.err
Actually, vim does it for you.
cheers,
Igor“Chris Rose” <> chris.rose@viasat.com> > wrote in message
news:9vlcb1$9i1$> 1@inn.qnx.com> …
I’m a newbie to QNX or Unix like enviroments so I know this is a very
simple
thing to do but I’ve not been succesful yet.
Standard redirection seems to not work.
I thought something like “cc myfile.c > compiler.out” would work.
However, compiler.out is just an empty file after the compiler. So what’s
the trick?
–
my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.
Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com
Make and grep support is part of vim so I don’t think you need to do
anything
special. By the way, vim comes with on line help and tutorial, so that
you always can type something like “:help” or in your case “:help make”.
There is also www.vim.org web site were you can find everything about vim.
cheers,
Igor
“Miguel Simon” <simon@ou.edu> wrote in message
news:3C23A87B.945B593D@ou.edu…
Igor…
If I want to compile directly from vim, do I have to set something up?
In other words, will vim read the common.mk file and such? For example,
in the directory where I have common.mk, I type:make clean; make install
and things get made, and things get installed. Will vim do likewise,
and if not, how could I set vim up to do likewise?Thanks…
Miguel.
Igor Levko wrote:make 2>&1 | tee file.err
Actually, vim does it for you.
cheers,
Igor“Chris Rose” <> chris.rose@viasat.com> > wrote in message
news:9vlcb1$9i1$> 1@inn.qnx.com> …
I’m a newbie to QNX or Unix like enviroments so I know this is a very
simple
thing to do but I’ve not been succesful yet.
Standard redirection seems to not work.
I thought something like “cc myfile.c > compiler.out” would work.
However, compiler.out is just an empty file after the compiler. So
what’s
the trick?
\
my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com