fixed linking in C++