I'm a little confused.
In KinematicCloud.H you have
1 2 3 4 5
template<class CloudType>
class KinematicCloud
:
public CloudType,
public kinematicCloud
so `kinematicCloud' is a type
But in mykEpsilon.H, it is an object extern Foam::basicKinematicCloud kinematicCloud;
I guess that your problem is that you have name collision.
You have the type Foam::kinematicCloud and the object ::kinematicCloud
Because you are defining functions inside the `Foam' namespace, the compiler thinks that you are refering to the type instead of the object.
As a solution, use ::kinematicCloud when referring to the object or change its name so there is no confusion.
I can't pull out these files in front of int main. I believe it has to be here. This part of file was my starting point when I started to write my additional code. So I think I can't use the concept of introducing global object into my library.
I have to use the other way. I am not sure, but I think that I have to introduce my object into library as a parameter of a function. I have to look more into the code for that.
I am very grateful to you for every advice that you gave me.