Subject:
|
Re: Roboarm.nqh
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Wed, 22 Dec 1999 19:41:43 GMT
|
Viewed:
|
1899 times
|
| |
| |
In lugnet.robotics.rcx.nqc, Robert G. Fay writes:
> I am working my way through Dave Baums' Mindstorm book and I have lost my
> way regarding the #include command. The roboarm1.nqc program calls for
> roboarm.nqh to be included. The program will not compile because it "cannot
> open roboarm.nqh". Some where I have become confused. What should I do with
> the roboarm.nqh so that it can be used by roboarm1.nqc?
The idea behind including files is that it allows a common set of definitions
and/or functions to be shared by multiple programs.
NQC by default searches the current directory for any include files. It is
also possible to specify a search path for inlcude files either with an
environment variable or a command line option.
In general, if you're using the command line version of NQC, then the simplest
thing is to put the .nqh file in the same directory as the .nqc file, then run
the compiler when in that directory.
From RcxCC things may be more difficult. I'm pretty sure RcxCC treats the
directory containing rcxcc.exe as the current directory. This means that you'd
need to put the .nqh file into that directory in order for it to be found. I
know this is awkward - perhaps it can be addressed in a future version of
RcxCC.
Another alternative is to use an environment variable to specify the include
path (I think there's some info on this in the NQC User Manual). However, if
you're not familiar with things like environment variables and search paths,
this is probably more trouble than it is worth.
If you're using MacNQC, then keeping the .nqh and .nqc files in the same folder
should work
|
|
Message has 1 Reply: | | Re: Roboarm.nqh
|
| I was using the RcxCC program. I put the nqh file in the RcxCC directory and everything worked fine. Thanks for the information. By the way, I am really enjoying your book. I hope everyone gets a chance to read and use it. -- Bob Fay (...) (25 years ago, 22-Dec-99, to lugnet.robotics.rcx.nqc)
|
Message is in Reply To:
| | Roboarm.nqh
|
| I am working my way through Dave Baums' Mindstorm book and I have lost my way regarding the #include command. The roboarm1.nqc program calls for roboarm.nqh to be included. The program will not compile because it "cannot open roboarm.nqh". Some (...) (25 years ago, 22-Dec-99, to lugnet.robotics.rcx.nqc)
|
4 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
|
|
|
|