Also, and apologies if this is VMS noob question, but how does the linker successfully create my sleep.exe program when there are undefined symbols? The linker messages are just warnings rather than errors.
Code: Select all
$ type sleep.cpp
#include <chrono>
using namespace std::chrono_literals;
#include <thread>
int main()
{
std::this_thread::sleep_for(1s);
return 0;
}
$ clang -std=c++17 sleep.cpp
$ link sleep
%ILINK-W-NUDFSYMS, 2 undefined symbols:
%ILINK-I-UDFSYM, __floatditf
%ILINK-I-UDFSYM, __lttf2
%ILINK-W-USEUNDEF, undefined symbol __lttf2 referenced
section: .text._ZNKSt3__16chrono13__duration_ltINS0_8durationIxNS_5ratioILx1ELx1EEEEENS2_IgS4_EEEclERKS5_RKS6_
offset: %X00000000000000AF
module: SLEEP
file: USERS:[DMCCORM1]SLEEP.OBJ;3
%ILINK-W-USEUNDEF, undefined symbol __floatditf referenced
section: .text._ZNKSt3__16chrono15__duration_castINS0_8durationIxNS_5ratioILx1ELx1EEEEENS2_IgS4_EES4_Lb1ELb1EEclERKS5_
offset: %X000000000000002C
module: SLEEP
file: USERS:[DMCCORM1]SLEEP.OBJ;3
$ r sleep
%SYSTEM-F-CALLUNDEFSYM, Call using undefined function symbol
Improperly handled condition, image exit forced by last chance handler.
Signal arguments: Number = 0000000000000003
Name = 0000000000003434
0000000080000978
000000000000001B
Register dump:
RAX = 0000000000000001 RDI = 0000000000100001 RSI = 0000000000003434
RDX = 0000000000000001 RCX = 0000000000000001 R8 = 0000000000000003
R9 = 0000000000000010 RBX = 000000007ACE7F00 RBP = 000000007ACE3390
R10 = 0000000000000022 R11 = 000000007ACE3180 R12 = 000000007ACE79A8
R13 = 0000000000000000 R14 = 0000000000000003 R15 = 0000000106084606
RIP = 0000000080000978 RSP = 000000007ACE3348 SS = 000000000000001B
$