You typically see something like this in a DLL header...
So when you're actually compiling the DLL, you have "BUILDING_MY_DLL" defined. That way, anything decorated with "MY_API" will be exported from the DLL.
# pragma message ("Compiling MyApi.DLL")
# define MY_API __declspec(dllexport)
# pragma message ("Linking to MyApi.DLL")
# define MY_API __declspec(dllimport)
When you're compiling something that uses the DLL, you should not have "BUILDING_MY_DLL" defined. So when you include the DLL header, anything decorated with "MY_API" will be imported from the DLL. Then you just have to link with the import library to resolve all those imported symbols.
I only remember getting that linker warning when I wasn't doing the above correctly