× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dennis Lovelady <iseries@...> writes:


Sorry; long commute today.

Hmmm... looks OK to me. I noticed in the documentation that if INCDIR is
used on the compile listing, the INCLUDE variable is ignored. You don't
happen to have that, implicitly somehow or explicitly, do you? The compile
listing will tell you, on the first page, where it says "Include directory:'
(should be *NONE)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
The best way to save face is to keep the lower part full

Will you please show us what your ADDENVVAR command looks like, and or
the output from:

QSH CMD('env > /tmp/my-environment.txt')

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"If you steal something small you are a petty thief, but if you steal
millions, you are a gentleman of society."
-- Greek Proverb
"We hang the petty thieves and appoint the great ones to public office."
-- Aesop

I am attempting to compile a C++ module (on a V5R3 box) with the
source code in the IFS. According to the "ILE C/C++ Programmers'
Guide" (Version 5; SC09-2712-05) an include directory can be
specified using INCDIR (Include Directory) command parameter or
INCLUDE environment variable.

The problem is:
1. when I specify the include directory in the INCDIR parameter the
module is created; no problem; 2. when I specify the include
directory using the INCLUDE environment variable the compilation
fails;


Dennis,

0. ADDENVVAR command:

ADDENVVAR ENVVAR(INCLUDE)
VALUE('./include')
REPLACE(*YES)

1. my-environment.txt output:

ICU_DATA=/QIBM/ProdData/OS400/icu/data
PASE_PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/
usr
/bin:/QOpenSys/usr/local/bin:/QOpenSys/usr/local/bin/pgp-6.5.8:/usr/local/bi
n
INCLUDE=./include
QIBM_USE_DESCRIPTOR_STDIO=Y
TRACEOPT=UNLINK
QIBM_DESCRIPTOR_STDERR=CRLN=N
QIBM_DESCRIPTOR_STDOUT=CRLN=N
QIBM_DESCRIPTOR_STDIN=CRLN=Y
LOGNAME=my_user
SHLVL=1
HOSTTYPE=powerpc
HOSTID=my_IP
HOSTNAME=my_host_name
OSTYPE=os400
OSTYPE=os400
MACHTYPE=powerpc-ibm-os400
TERMINAL_TYPE=PIPELINE
HOME=/my_dir
PATH=/usr/bin:

Thanks,
Darek



Dennis,

0. From the compilation spool file:

Include directory . . . . . . . : *NONE

1. The âILE C/C++ Programmers Guideâ âexplainsâ that INCDIR and INCLUDE can be
used together:

Quotation:
âIf the include search contains a defined INCLUDE environment variable for
both C and C++ compilers, the resulting include search order including is:

#include <file_name>

1. If you specify a directory in the INCDIR parameter, the compiler searches
for file_name in that directory first.
2. If more than one directory is specified, the compiler searches the
directories in the order that they appear on the command line.
3. If the INCLUDE environment variable is defined, the compiler searches the
directories in the order they appear in the INCLUDE path.
4. Searches the directory /QIBM/include.

#include âfile_nameâ

1. Searches the directory where your current source file resides. The current
source file is the one that contains the directive #include "file_name".
2. If you specify a directory in the INCDIR parameter, the compiler searches
for file_name in that directory.
3. If more than one directory is specified, the compiler searches the
directories in the order that they appear on the command line.
4. If the INCLUDE environment variable is defined, the compiler searches the
directories in the order they appear in the INCLUDE environment variable.
5. Searches the directory /QIBM/include.â

Thanks a lot,
Darek


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.