Hi, Tim, I notice that "TARGET_COMPILER_DIR" is a good variable if we use msys2, because all the include and lib are its sub folders.
So, I use this variable now, today I found you have post this method already.
Not only linking to wxWidgets library, but also other libraries can use such method.
For example, if I use OpenCV library inside msys2, I now use such include search path:
$(TARGET_COMPILER_DIR)include\opencv4
if I use cairo library, I use such include search path
$(TARGET_COMPILER_DIR)include\cairo
I hope this can help others.