You don't need to do anything in the C code but the Binder will give a missing external reference (IEW2456E) message. You can specify LET in the Binder options to treat RC=8 as non-fatal.
-----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Neale Ferguson Sent: Friday, May 5, 2023 2:53 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: XLC - Weak symbols Is it possible to declare a “weak” symbol with XLC? i.e. Using GNU C I can either #pragma weak yyyy extern void * yyyy; extern void * xxxx __attribute__((weak)); But neither of these forms are accepted by XLC and I can’t see anything in the language reference. I want to define a symbol that may or may not be present at link time such that it is NULL if not found but don’t want the linker flagging it as an error (a warning is fine). Neale ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN