Non-standard language options and incomplete feature support are normal for compilers across virtually all programming languages from BASIC to Fortran and here C++.
Modern C++ features typically require using specific compiler flags to enable support.
Knowing what compiler flags to set can be confusing for those new to modern C++ features.
Setup of C++ compiler flags for modern C++ features is easily and automatically handled by
CMake or Meson.
The original Windows Subsystem for Linux WSL1 (2016 - 2019) doesn’t work with Nmap.
However, the new WSL2 introduced for Windows 10 beta testers in summer 2019 and the general public in 2020 does work with Nmap directly.
For those not able to use Nmap in WSL2 in Windows, the procedure below uses Cygwin.
On Windows, use Nmap from Windows itself or via Cygwin (which is just calling native Windows Nmap).
This is the Right Way™ to do it. The Nmap Windows build is solid and uses Windows-specific API calls to do things really fast and well. Even if WSL ever supports the Linux build, it won't be as good as native. https://t.co/r2PkSxuoJE
Install nmap “self-installer” .exe. When asked, also install Npcap.
Cygwin: add to ~/.bash_profile the following. Note the \ and \( are vital for Cygwin shell to interpret the command correctly.
alias nmap="/cygdrive/c/Program\ Files\ \(x86\)/Nmap/nmap.exe"
Open a new Cygwin window to start using nmap
Starting Nmap ( https://nmap.org )
Nmap scan report for 18.104.22.168
Host is up (0.0092s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
53/tcp open domain
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 7.41 seconds
errors about interface → try running Cygwin as Administrator (right click on Cygwin icon).
find interface names available to nmap
to find servers with a particular port open on a subnet, try my
program that scans for servers without nmap.
If you don’t install Npcap when asked in the nmap installer, nmap does not work.
Nmap claimed no host existed at a known working IP address.
Why isn’t nmap built into Cygwin?
nmap requires deeper access to the Windows networking stack that would go beyond the normal scope of Cygwin.
Note that Nmap itself needs the separate program Npcap (forked from WinPcap) to work on Windows.
Sadly, PGI 19.7
deprecated PGI debugger.
PGI Java-based pgdbg graphical debugger was for Fortran, C and C++ and was in the no-cost Community Edition as well.
The program to be debugged needs compile options -g -O0 to provide maximum debugging information.
Example with hello.f90:
pgfortran -g hello.f90
pgdbg a.out opened the graphical Fortran debugger.
If you don’t see code in the upper left of the graphical PGI debugger for your program, be sure you compiled the executable with -g -O0 options.
Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10). To use MSVC cl.exe C / C++ compiler from the command line, additionally select the C++ build tools.
Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via setuptools.extension.Extension or numpy.distutils.core.Extension.
For example, building
modules in Windows with Python requires Visual C++ SDK as installed above.
On Linux and Mac, the C++ libraries are installed with the compiler.
This was the former link to Microsoft Visual C++ Build Tools–no longer active:
Visual Studio is used for Python on Windows whenever C, C++ or other compiled language extension modules are used from Python.
For example, a C library may be used for better performance, seamlessly called from Python.
Matlab and GNU Octave are constantly adding new functionality.
However, legacy versions remain in use for years.
One in general may not be able to overload a Matlab function in Octave because of how Octave provides many functions as files,
and cannot distinguish them from user files.
The “overloading” we do here is to provide a similarly but distinctively named function that seamlessly uses the new syntax when available,
with a simple fallback.
example that was added in Matlab R2017b, the fallback only works for single files.
Create a file “is_file.m” containing:
function ret = is_file(path)
if exist('isfile', 'builtin') ==5|| exist('isfile', 'file') ==2 ret = isfile(path);else ret = exist(path, 'file') ==2;endend% function