- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- CXX /INCLUDE qualifier
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2003 01:46 PM
08-05-2003 01:46 PM
/INCLUDE="../rtsrc"
which is the way I do it on UNIX and it works fine. This works on OpenVms for direct includes (where the .cxx file includes a .h file) but does not seem to work for nested includes (where a .h file includes another .h file). Has anyone else encountered this problem or know a way to solve it?
Thanks,
Ed Day
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2003 07:34 PM
08-05-2003 07:34 PM
Re: CXX /INCLUDE qualifier
Note that in addition to /INCLUDE_DIRECTORY, the CXX command also has a qualifier /NESTED_INCLUDE_DIRECTORY which controls where the compiler looks for include files relative to the referencing file. Perhaps the default for this qualifier isn't what you want?
Experimenting with various combinations of qualifiers using Compaq C++ V6.5-004, I was able to make the compiler find nested include files where I wanted them fairly easily. Also note that the search logic is different depending on the syntax you use:
#include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2003 10:44 PM
08-05-2003 10:44 PM
Re: CXX /INCLUDE qualifier
I agree with John.
I compiled with a C (not C++) and thy have same qualifier. Try using /NESTED=PRIMARY.
If yet don't work use vms convention /INCL="[-.RTSRC]"
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2003 06:00 AM
08-06-2003 06:00 AM
Re: CXX /INCLUDE qualifier
cxx /include="../rtsrc" /include="../rtbersrc" /nested=primary acGenEncode.cxx
(I also tried dir names in VMS form, both relative and absolute).
The file "acoptions.h" resides in the current working directory and includes "asn1type.h" which resides in the rtsrc directory. When I go to compile, I get the following:
#include "asn1type.h"
.....................^
%CXX-E-SRCFILNOOPEN, could not open source file "asn1type.h"
at line number 29 in file SPE51$DKA0:[ASN1C.ACSRC]ACOPTIONS.H;1
I am thinking the only option is to dump all the include files into a single directory which I hope is not the case.
Regards,
Ed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2003 06:41 AM
08-06-2003 06:41 AM
Re: CXX /INCLUDE qualifier
Unix ;->
Do not use separate /include options (the last one wins and is the only one active), but a list like /include=(dir1,dir2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2003 07:40 AM
08-06-2003 07:40 AM
Re: CXX /INCLUDE qualifier
Martin say correct.
With vms second /include overlap first so ../rtsrc is ignored.
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2003 08:53 AM
08-06-2003 08:53 AM
Re: CXX /INCLUDE qualifier
I tried /include=("../rtsrc","../lmsrc") and it made no difference.
Copying all of the header files to my current working directory is working, so I guess I'll stick with doing it that way.
Thanks to all who answered.
Ed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2003 06:09 PM
08-06-2003 06:09 PM
SolutionI'm not completely clear on where you want the nested include file to be read from. You should be able to find some combination of qualifiers that do whatever you want. Try this test:
main.cxx
#include
#include "a.h"
a.h
#include
#include "b.h"
b.h
// comment identifying the location
put appropriately commented copies of b.h in the current directory, the directory containing main.cxx and each of the include directories in the list. Then compile with
/LIST/SHOW=INCLUDE. Note that the location chosen depends on the format used. For example, with copies of B.H present in both source directory and the second include directory, and compiling with
$ CXX [.SRC]MAIN.LIS/LIST/SHOW=INCL-
/INCLUDE=([.INCL1].[.INCL2])/NEST=PRIMARY
my listing gives:
1 #include
I1 2 #include
I2 3 // [.INCL2]B.H
I1 4 #include "b.h"
I2 5 // [.SRC]B.H
6 #include "a.h"
I1 7 #include
I2 8 // [.INCL2]B.H
I1 9 #include "b.h"
I2 10 // [.SRC]B.H
Removing the file from the source directory and using the same command it changes to:
1 #include
I1 2 #include
I2 3 // [.INCL2]B.H
I1 4 #include "b.h"
I2 5 // [.INCL2]B.H
6 #include "a.h"
I1 7 #include
I2 8 // [.INCL2]B.H
I1 9 #include "b.h"
I2 10 // [.INCL2]B.H
The search path is defined in HELP CXX/INCLUDE. If you have an example that doesn't follow the rules, please try and characterise it with skeletal #include sources and report it to your local customer support centre.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2003 04:36 AM
08-07-2003 04:36 AM
Re: CXX /INCLUDE qualifier
Upon closer inspection, I found putting all of the include directories in parens using a single /include statement worked. Thanks for all your help.
Regards,
Ed