I have a big solution with lots of projects, using VS2008 SP1, and at least once a day I encounter the LNK2022 error. If I do a full rebuild of the solution it builds fine,
Try this in xxx.cpp and xxx2.cpp:
#ifndef _PROTECT_MY_HEADER #define _PROTECT_MY_HEADER #include "inc.h" #endif
#pragma once isn't enough to protect the header in this case.
#pragma once