Using C++ classes in Static lib
By Sathya Priya R
24 Jul 2015 09:36
English
2 Replies
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.
You must log in to use this service. Log in now?
The tag you entered already exists.
Do you want to report this post as spam?
The post has been reported as spam.
cannot be empty.
Are you sure you want to cancel and return to the list?
The code has been copied to the clipboard.
Enter a title.
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.