Right thing to do with multiple libraries. (choose witch one to include)

Ok, i think it is simple, sometimes we have 2 or 3 libraries that do the same thing, but in different modes, so in the library folder you have multiple libraries for the same device or function.
When compiling the IDE says it detects multiple libraries and warns you that ti is using the xxx and not the yyy library.
How can i control witch one it uses?
maybe it's possible to include a library in the sketch folder and force it to use that?

What is the right think to do?

Tnx

How can i control witch one it uses?

You can't.

maybe it's possible to include a library in the sketch folder and forse it to use that?

That's not even going to determine which one to use.

mactsk:
Ok, i think it is simple, sometimes we have 2 or 3 libraries that do the same thing,

If they have different names don't you just use the appropriate name in your code #include

...R

Yes but sometimes they don't have different names, or you need to modify a library to make it work correctly (like if you want to use the sd library and the gsm library)

Is it simple to change the name of a library, like from sd.h to mysd.h? that would be a starting point to maintain different versions for different projects.

mactsk:
Yes but sometimes they don't have different names,

Doesn't your PC operating system object to two files with the same name?
Mine does.

I am conscious of @PaulS's comment in Reply #XX, however I THINK if you include the .cpp and .h files in your project directory and use #include "myLibrary.h" that it will use the local version in preference to the version in the Libraries directory.

I had thought (until yesterday) that it would create an error if you use "myLibrary.h" when there was no local copy. To my mind that would be far more sensible.

...R