- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Re: How to include header files in ProC/C++ progra...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО01-07-2005 09:34 AM
тАО01-07-2005 09:34 AM
How to include header files in ProC/C++ programs?
Both test.pc and defs.h are in same directory /usr/users/user1/ .
So, we have tried to include this header file in the test.pc as
"
#include
.....
"
It gives me an error saying, it could not open the file defs.h .
"PCC-S-02015, unable to open include file "
And any variable which is defined in test.pc results in an error in test.pc with unidentified identifier.
" PCC-S-02322, found undefined identifier"
But if we try to mention the full path in include directive it works. Like, if we say #include
Any suggestions are appreciated!
- Tags:
- ProC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2005 11:17 AM
тАО01-07-2005 11:17 AM
Re: How to include header files in ProC/C++ programs?
"Any variable which is defined in defs.h, if used in test.pc , then it gives me PCC-S-02322, found undefined identifier"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2005 05:30 AM
тАО01-08-2005 05:30 AM
Re: How to include header files in ProC/C++ programs?
the way you use include the compiler assumes the file to be in /usr/include.
You will have to use
#include "defs.h"
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 01:31 AM
тАО01-10-2005 01:31 AM
Re: How to include header files in ProC/C++ programs?
I am trying to build the ProC module from /usr/users/user1 directory.
There was one include= option in ProC compiler, but it is not helping when I kept it as include=. for looking into the current directory for the header files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 04:08 AM
тАО01-10-2005 04:08 AM
Re: How to include header files in ProC/C++ programs?
when you use
#include
it is implicitely /usr/include/defs.h
the <> are resolved to /usr/include
If you want to use another path use the ""
#include "/usr/users/user1/defs.h"
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 04:12 AM
тАО01-10-2005 04:12 AM
Re: How to include header files in ProC/C++ programs?
If I keep include "/usr/users/user1/defs.h" it works. But I need to use relative to the current directory as include "defs.h".
This is the requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 08:39 AM
тАО01-10-2005 08:39 AM
Re: How to include header files in ProC/C++ programs?
you said both files are in the same directory. So use
#include "defs.h"
hth,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 10:35 AM
тАО01-10-2005 10:35 AM
Re: How to include header files in ProC/C++ programs?
"PCC-S-02015, unable to open include file"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 11:14 AM
тАО01-10-2005 11:14 AM
Re: How to include header files in ProC/C++ programs?
can you post the compilation script?
From which directory do you compile the programme?
thanks,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 03:12 PM
тАО01-10-2005 03:12 PM
Re: How to include header files in ProC/C++ programs?
I am using ProC options as below
"
proc include=. iname=../../../../src/unvantive/shared_lib_test/error_handler.pc oname=error_handler.c
"
$ make error_handler.c
cd ../../../obj/alpha/unvantive/shared_lib_test
proc include=. iname=../../../../src/unvantive/shared_lib_test/error_handler.pc
oname=error_handler.c
Pro*C/C++: Release 9.2.0.1.0 - Production on Mon Jan 10 23:09:03 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /oracle/app/oracle/product/9.2.0.1.0/pr
ecomp/admin/pcscfg.cfg
Error at line 8, column 10 in file ../../../../src/unvantive/shared_lib_test/err
or_handler.pc
#include "csp_dbaccess.h"
.........1
PCC-S-02015, unable to open include file
Error at line 12, column 10 in file ../../../../src/unvantive/shared_lib_test/er
ror_handler.pc
#include "csp_utilities.h"
.........1
PCC-S-02015, unable to open include file
cp -p error_handler.c /home/psatish/sandbox/csp_unvantive/src//unvantive/shared_
lib_test
$