My target module is an executable to be built from X.cpp
and Y.cpp
, both these two files need a common .h
file:
extern HANDLE hPipe;
extern IMediaSample *pSave = NULL;
But when I build the module, I got an error saying :
Y.obj : error LNK2005: "struct IMediaSample * pSave" (?pSave@@3PAUIMediaSample@@A) already defined in X.obj
How to solve this issue?