Export Class and Struct

Since Struct and Class are almost the same thing, I will just talk about one of the two.

Let's talk about struct ba.

There are three kinds struct:

1. Only contain data member without functions.

2. have only inline functions.

3. have only function declaration in  header file.

For 1, there is no need to export the struct, because: whether putting __declspec(dllexport) or not, in the module where to use the struct, there is no need to link its lib.

For 3, it's a must to export the struct since the definition of member functions are in cpps.

For 2, if export it, just the same as case 3; if not export it, the struct in the caller module will just treat the struct to be its own one since all definitions can be found in the header file.

Need further research....Just note down to this extent... will continue...

你可能感兴趣的:(Export)