[OpenSIPStack] Problems with Ptrace
Brought to you by:
joegenbaclor
From: Claudio M. <cmi...@gm...> - 2008-01-08 18:06:44
|
Hello, I was working in a softphone and during my work I discovered that my log file was not being created. Since I was using Ptrace I found that it was really weird. Actually my program creates a log file, but the log sees only the PTRACE's in the main file. I can not use Ptrace in files that are not my main file. I tried to put "# define PTRACING 1" in my other files, but it did not work as well. The following example does not work : hello.cpp #include <iostream> #include <ptlib.h> using namespace std; class Hello { public: void digaoi(){ PTRACE(1,"Inside hello \n"); cout << "Hello world!\n"; } }; oi.cpp - main file #define PTRACING 1 #include <ptlib.h> //#include <iostream> #include "C:\Documents and Settings\voip\My Documents\hello.cpp" class Oi : public PProcess { PCLASSINFO(Oi, PProcess) public: void Main(); }; PCREATE_PROCESS(Oi) void Oi::Main() { Hello * hello = new Hello(); hello->digaoi(); char * filename = "C:\\Documents and Settings\\voip\\Desktop\\ttt\\src\\buda3.txt" ; //cout << "Test"; PTrace::Initialise(32, filename, PTrace::Blocks | PTrace::Timestamp | PTrace::Thread |PTrace::FileAndLine); PTRACE(1,"Inside oi.cpp \n"); } Do you have any sugestion, or even a clue ? Thanks in advance. Claudio Miceli de Farias |