MinGW pkg-config not working (part 2)

Carlo B. carlo.bramini@gmail.com
Wed Apr 15 12:54:52 GMT 2020


Hello,
After the release of the new pkg-conf, with the use of symlinks
instead of a script for using the personality feature, I got some
strange errors at compile time.
Let's think to have a directory called "mylibrary" into your home
directory, so you have a path for example "/home/carlo/mylibrary".
In this directory create a file called "test.pc" with these lines:

Name: test
Description: test MinGW pkg-config  on CYGWIN
Version: 1.2.3
Libs:
Cflags: -I/home/carlo/mylibrary

Finally, add this directory to PKG_CONFIG_PATH environment variable.
Now, if you type this command on the console:

$ x86_64-w64-mingw32-pkg-config --cflags test
-I/usr/x86_64-w64-mingw32/sys-root/home/carlo/mylibrary

which is wrong, because it changed all references to "home/carlo" by
appending "/usr/x86_64-w64-mingw32/sys-root". Instead, if I type:

$ pkg-config --cflags test
-I/home/carlo/mylibrary

then the path it returned unchanged as expected.
Sadly, this behavior forces you to rebuild everything and to move all
stuff that you could normally have in your home directory into
"/usr/x86_64-w64-mingw32/sys-root/home/carlo", othewise it won't work
anymore.
Am I doing something wrong or it is the expected result and there is
another way to make things working again?

Thank you very much.
Sincerely.


More information about the Cygwin mailing list