It also says:
> Supply a directory which contains files with the
>appropriate extension. The default extension for C is
>".c" and the default extension for C++ is ".C".

I suspect that the word "default" is noise there and there's no way to change 
it, based on some searching (which I'm sure you also did).

Would links work? Those would be quick to create and easy/safe to delete. 
Haven't tried them myself.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Charles Mills
Sent: Monday, December 15, 2025 6:45 PM
To: [email protected]
Subject: How tell XLC C++ compiler to use non-default source file extension

I am asking here about the older, "legacy" XLC C++ compiler, not the newer 
"Open" C++ compiler.

I am compiling using JCL from source in a UNIX folder using //SYSIN DD 
PATH='folder'. I have lots of experience doing this. By default it compiles all 
source modules with a .C extension. It would make my life easier if I could 
tell it instead to compile all source modules with a .cpp extension. (Yes, I 
know how to do a UNIX wildcard rename but this would work better for me.) Does 
anyone know how to do this? The obvious //SYSIN DD PATH='folder/*.cpp' fails 
with a JCL error. I don't see a relevant compiler option.

A compile fails with the error CCN0704(W) There are no files with the default 
extension in /folder/ which leads me to ask if C is the *default* extension, 
then doesn't that imply that you can change it? The message explanation is not 
promising.

Does anyone know how to specify a non-default source file extension?

Thanks,

Charles

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to