The error is likely shown as the include directory has not been added to the settings, to fix this error add the include directory of the library to the include directories on the Makefile settings page in VisualGDB. Adding the include directory there will also add it to IntelliSense directories.
To be sure… After every installed library I need to run sysroot sync – ok. Once I have added the path ‘C:SysGCCraspberryarm-linux-gnueabihfsysrootusrlocalinclude
I then only need to specify the name of the library in the makefile settings (given that every new lib is installed in the same directory on the raspberry), is this right?
Yes, this is correct. You need to specify the library name without the extension and the ‘lib’ prefix. E.g. just ‘pthread’ for libpthread.a. This comes from the syntax of gcc’s -l command that searches for the libraries automatically using the short library names. And as the linking happens on the Windows machine, the libraries should be present there (i.e. copied during sysroot synchronization).