For this project just win32 c++ (NOT MFC)
I have downloaded this project from [login to view URL] to trace function calls.
I have compiled Cmtrace and it runs fine.
Now I want use CMTRACE in a exutable and in a static library.
Then I have done a my custom win32 project.
It consists of two subprojects (TestTrace that contains WinMain and Lib1 that is static library )
I have also created a folder CMTRACE that contains just [login to view URL]
Lib1 contains just a class MyClass with a memeber function Summ() that does the summ of two doubles.
I need like trace WinMain :
CM_TRACE_FILE("./[login to view URL]"); // just once
CM_TRACE_FUNC("main");
and Summ function
double MyClass::Summ(double a1,double a2)
{
CM_TRACE_FUNC("MyClass::Summ");
return (a1+a2);
}
but errors occur during compilation . "..[login to view URL]([login to view URL]) : error LNK2005: "private: static int cm::Trace::depth_" (?depth_@Trace@cm@@0HA) already defined.."