Menu
Sites
Language

Using C++ classes in Static lib

Using C++ classes in Static lib

BY 24 Jul 2015 Native Application Development

Hi,

I have added some classes with methods and built the static lib.

How do we export these class methods for use by other lib’s and exe’s?

Say for example, inside the static lib there is a class,

Class A{

int mValue;

public:

A();

int AddNumbers(int a){

return (this->mVaue + a);

}

};

How do we call the AddNumbers method? Where should we add the “extern” keyword ??

Thanks.

Written by