#pragma 'pragma' : use of reserved segment 'segment' has undefined behavior, use #pragma comment(linker, ...)
The .drectve option was used to pass an option to the linker. Instead use pragma comment for passing a linker option:
#pragma comment(linker, "...")