Subject:
|
Re: Can't get Linux NQC to compile/Run
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 12 Sep 2000 06:10:26 GMT
|
Viewed:
|
2171 times
|
| |
| |
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).
Dave
--
reply to: dbaum at enteract dot com
|
|
Message has 1 Reply:
Message is in Reply To:
| | Re: Can't get Linux NQC to compile/Run
|
| (...) 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. Dean -- (...) (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
|
|
|
|