I do not know the exact use of nul. When the build works cleanly nul is removed at the end of the process so if one looks for it then it will not exist.
Learning the command to delete it took days before getting a reliable and easy way to remove it, was even using full system reboots at first.
EDIT
Per Google AI
The NUL device file is used with MSVC and CMake on Windows to discard output, often in build scripts or commands like >NUL . It acts as a black hole for standard output or error redirection, ensuring that command-line output from compilers or tools does not clutter the build logs.
These warnings are showing up.
Wondering
- Do you want to fix them
- Want me to work on them and send PRs as needed
- You pick some and have me do some
- Ignore them for now
I am in no rush to fix them at present but would like to fix them at some point and you seem to like seeing more of the details as it seems I am the only one in the entire universe who tries to build SWI-Prolog for Windows on Windows using MSVC.
Line 168: C:\dev-MSVC-PR\swipl-devel\src\pl-write.c(216,7): warning C4013: 'ms_snprintf' undefined; assuming extern returning int [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 170: C:\dev-MSVC-PR\swipl-devel\src\pl-thread.c(1969,3): warning C4013: 'ms_snprintf' undefined; assuming extern returning int [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 194: C:\dev-MSVC-PR\swipl-devel\src\pl-dict.c(274,3): warning C4133: 'function': incompatible types - from 'cmp_t (__cdecl *)(const void *,const void *,void *)' to 'int (__cdecl *)(const void *,const void *,void *)' [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 195: C:\dev-MSVC-PR\swipl-devel\src\pl-dict.c(319,39): warning C4133: 'function': incompatible types - from 'cmp_t (__cdecl *)(const void *,const void *,void *)' to 'int (__cdecl *)(const void *,const void *,void *)' [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 213: C:\dev-MSVC-PR\swipl-devel\src\os\pl-buffer.c(161,46): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 222: C:\dev-MSVC-PR\swipl-devel\src\os\pl-text.c(1103,5): warning C4013: 'ms_snprintf' undefined; assuming extern returning int [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 256: C:\dev-MSVC-PR\swipl-devel\src\minizip\zip.c(995,9): warning C4267: 'function': conversion from 'size_t' to 'uLong', possible loss of data [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 257: C:\dev-MSVC-PR\swipl-devel\src\minizip\zip.c(1117,92): warning C4267: '=': conversion from 'size_t' to 'uLong', possible loss of data [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 258: C:\dev-MSVC-PR\swipl-devel\src\minizip\zip.c(1122,32): warning C4267: '=': conversion from 'size_t' to 'uLong', possible loss of data [C:\dev-MSVC-PR\swipl-devel\build\src\swiplobjs.vcxproj]
Line 4096: C:\dev-MSVC-PR\swipl-devel\packages\clib\form.c(370,7): warning C4267: '-=': conversion from 'size_t' to 'long', possible loss of data [C:\dev-MSVC-PR\swipl-devel\build\packages\clib\plugin_cgi.vcxproj]
Line 4604: C:\dev-MSVC-PR\swipl-devel\packages\clib\nonblockio.c(1527,12): warning C4018: '<': signed/unsigned mismatch [C:\dev-MSVC-PR\swipl-devel\build\packages\clib\plugin_socket.vcxproj]
Line 5321: LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev-MSVC-PR\swipl-devel\build\packages\nlp\plugin_snowball.vcxproj]
Line 6003: C:\dev-MSVC-PR\swipl-devel\packages\jpl\src\main\c\jpl.c(1901,5): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\dev-MSVC-PR\swipl-devel\build\packages\jpl\plugin_jpl.vcxproj]
Line 6004: C:\dev-MSVC-PR\swipl-devel\packages\jpl\src\main\c\jpl.c(1902,5): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\dev-MSVC-PR\swipl-devel\build\packages\jpl\plugin_jpl.vcxproj]
Line 6005: C:\dev-MSVC-PR\swipl-devel\packages\jpl\src\main\c\jpl.c(3165,5): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\dev-MSVC-PR\swipl-devel\build\packages\jpl\plugin_jpl.vcxproj]
Line 6006: C:\dev-MSVC-PR\swipl-devel\packages\jpl\src\main\c\jpl.c(4927,7): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\dev-MSVC-PR\swipl-devel\build\packages\jpl\plugin_jpl.vcxproj]
Line 6224: LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev-MSVC-PR\swipl-devel\build\packages\libedit\plugin_libedit4pl.vcxproj]
Line 6853: C:\dev-MSVC-PR\swipl-devel\packages\semweb\murmur.c(74,25): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data [C:\dev-MSVC-PR\swipl-devel\build\packages\semweb\plugin_rdf_db.vcxproj]
Line 6920: C:\dev-MSVC-PR\swipl-devel\packages\semweb\murmur.c(74,25): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data [C:\dev-MSVC-PR\swipl-devel\build\packages\semweb\plugin_turtle.vcxproj]
Line 7448: C:\dev-MSVC-PR\swipl-devel\packages\cpp\test_cpp.cpp(2376,17): warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. [C:\dev-MSVC-PR\swipl-devel\build\packages\cpp\plugin_test_cpp.vcxproj]