Subject:
|
Re: Can't get Linux NQC to compile/Run
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 12 Sep 2000 17:53:46 GMT
|
Viewed:
|
2007 times
|
| |
| |
Dave Baum wrote:
> In article <39BDC401.DA322AD7@akasa.bc.ca>, Dean Husby
> <nntp@akasa.bc.ca> wrote:
>
> > Dave Baum wrote:
> >
> > > #include <vector.h>
> > >
> > > int main(int, char **)
> > > {
> > > vector<int> v;
> > >
> > > return 0;
> > > }
> >
> > I'm afraid I don't have a clue how to compile that one.
> >
> > I tried make test.c
> > but, of course, that doesn't work.
> >
> > I also tried
> > [tfm@linux tfm]$ gcc ./test.c
> > ./test.c:1: vector.h: No such file or directory
> >
> > but not much luck there either.
>
>
> You need to compile it as a C++ source file. There are ways to force
> C++ compilation of .c files, but its probably easier to just save it as
> test.cpp, then try:
>
> g++ test.cpp
>
> Assuming that the compiler knows where to find the C++ standard
> includes, it should be able to #include <vector.h>. If it can't find
> vector.h, then you'll have to add a -I option to the command (after
> figuring out where vector.h lives).
It couldn't find where vector.h lives. I'll have to hunt.
Dean
--
Coin-Op's For Sale!: http://www.akasa.bc.ca/tfm/coin-op.html
Dean's Lego Workshop: http://www.akasa.bc.ca/tfm/lego_wr.html
Vancouver Lego Club: http://www.akasa.bc.ca/vlc
|
|
Message has 1 Reply:
Message is in Reply To:
| | Re: Can't get Linux NQC to compile/Run
|
| (...) You need to compile it as a C++ source file. There are ways to force C++ compilation of .c files, but its probably easier to just save it as test.cpp, then try: g++ test.cpp Assuming that the compiler knows where to find the C++ standard (...) (24 years ago, 12-Sep-00, to lugnet.robotics.rcx.nqc)
|
26 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|