Class not visible from Shared Library

Class not visible from Shared Library

BY 06 Mar 2015 Native Application Development

Hi All,

I have created dynamic library for one of my project module. This library has class (Lets say TestClass).

When I link this library to my service app(By specifying library name as well as .so file path and including required header file from C++ build settings).

But normal c APIs are linked when I compile the service app. But I am not able to create TestClass object. It says undefined reference.

I have included header file also. There is no error in including header file.

 

    tizentest(); //Exported API from shared library – Works fine

    MyClass my; //Class in shared library – Gives below Error

———————————————————-

D:\AWTizenAgent\AWApplist\Debug/../src/awapplist.cpp:121: undefined reference to `MyClass::MyClass()’
D:\AWTizenAgent\AWApplist\Debug/../src/awapplist.cpp:132: undefined reference to `MyClass::~MyClass()’
D:\AWTizenAgent\AWApplist\Debug/../src/awapplist.cpp:132: undefined reference to `MyClass::~MyClass()’

Please help.

Thank you.

Written by