Undefined symol: Class CMdaAudioPlayerUtility

Login to reply to this topic.
Mon, 2008-03-17 13:17
Joined: 2008-02-12
Forum posts: 5

Hi,

Actually I wrote my own class in which I declared an object pointer for CMdaAudioPlayerUtility class
in order to access different functionalities of the class CMdaAudioPlayerUtility. I allocated the
memory by two phase construction. I again wrote another class inside which I am declaring an
object pointer of my first class and calling NewL() of my first class for memory allocation. But
I am giving build it is showing the error as
Undefined Symbol:'Class CMdaAudioPlayerUtility*..............

Please help me out.

Best Regards

PK


Mon, 2008-03-17 15:18
Joined: 2004-11-29
Forum posts: 1134
Re: Undefined symol: Class CMdaAudioPlayerUtility

Undefined symbol means that the compiler can't find the definition for the symbol.
You must make sure that each .cpp file that uses this symbol has access to the header file it is declared in...

To me, it sounds like you have written the code for your constructors in the .h-file of your class, but then only include the header for CMdaAudioPlayerUtility in the .cpp file.
That way, it will work fine to compile your original class, but you would get undefined symbol when trying to use it in another .cpp file without including the header for CMdaAudioPlayerUtility.

Study patterns for how to organize your cpp/header files in C++, and you will avoid problems like this.

Mon, 2008-03-17 20:20
Joined: 2007-09-23
Forum posts: 132
Re: Undefined symol: Class CMdaAudioPlayerUtility

I bet it won't be the header file that is missing but the .lib.

Tue, 2008-03-18 10:16
Joined: 2008-02-12
Forum posts: 5
Re: Undefined symol: Class CMdaAudioPlayerUtility

Hi Alert,

Thnx for ur help

  • Login to reply to this topic.