Found a 64bit double implementation library, but I cannot compile it

ughh that's confusing

Not really. You are telling the c++ compiler that the code is to be compiled using C calling convention. The c compiler knows that. When the linker runs, all the code produced will link together nicely.

fell like variables are duplicated in both language.

No variables are duplicated.